serverpod_auth_server library
Classes
- AppleAuthInfo
- Authentication info for Sign in with Apple.
- AuthConfig
- Configuration options for the Auth module.
- AuthenticationResponse
- Provides a response to an authentication attempt.
- AuthKey
- Provides a method of access for a user to authenticate with the server.
- AuthKeyInclude
- AuthKeyIncludeList
- AuthKeyRepository
- AuthKeyTable
- EmailAuth
- Database bindings for a sign in with email.
- EmailAuthInclude
- EmailAuthIncludeList
- EmailAuthRepository
- EmailAuthTable
- EmailCreateAccountRequest
- A request for creating an email signin. Created during the sign up process to keep track of the user's details and verification code.
- EmailCreateAccountRequestInclude
- EmailCreateAccountRequestIncludeList
- EmailCreateAccountRequestRepository
- EmailCreateAccountRequestTable
- EmailFailedSignIn
- Database table for tracking failed email sign-ins. Saves IP-address, time, and email to be prevent brute force attacks.
- EmailFailedSignInInclude
- EmailFailedSignInIncludeList
- EmailFailedSignInRepository
- EmailFailedSignInTable
- EmailPasswordReset
- Information about an email password reset.
- EmailReset
- Database bindings for an email reset.
- EmailResetInclude
- EmailResetIncludeList
- EmailResetRepository
- EmailResetTable
- Emails
- Collection of utility methods when working with email authentication.
- Endpoints
- GoogleAuth
- Convenience methods for handling authentication with Google and accessing Google's APIs.
- GoogleClientSecret
-
Contains information about the credentials for the server to access Google's
APIs. The secrets are typically loaded from
config/google_client_secret.json
. The file can be downloaded from Google's cloud console. - GoogleRefreshToken
- Database bindings for a Google refresh token.
- GoogleRefreshTokenInclude
- GoogleRefreshTokenIncludeList
- GoogleRefreshTokenRepository
- GoogleRefreshTokenTable
- Protocol
- RouteGoogleSignIn
- A route that redirects the user back to the client after signing in with Google. The redirect includes the auth code that will automatically be picked up by the serverpod_auth_google_flutter package.
- UserAuthentication
- Collects methods for authenticating users.
- UserImage
- Database bindings for a user image.
- UserImageInclude
- UserImageIncludeList
- UserImageRepository
- UserImageTable
- UserInfo
- Information about a user. The UserInfo should only be shared with the user itself as it may contain sensitive information, such as the users email. If you need to share a user's info with other users, use the UserInfoPublic instead. You can retrieve a UserInfoPublic through the toPublic() method.
- UserInfoInclude
- UserInfoIncludeList
- UserInfoPublic
- Information about a user that can safely be publicly accessible.
- UserInfoRepository
- UserInfoTable
- Users
- Business logic for handling users.
- UserSettingsConfig
- User settings.
Enums
- AuthenticationFailReason
- Defines a reason for a failed sign in.
- UserImageType
- Defines the format of stored user images.
Extensions
- RandomString on Random
- An extension for generating random strings.
- UserInfoExtension on UserInfo
- Convenience methods for the UserInfo class.
- UserInfoMethods on UserInfo
- Additional methods for UserInfo.
Functions
-
authenticationHandler(
Session session, String key) → Future< AuthenticationInfo?> -
The
AuthenticationHandler
, uses the auth_key table from the database to authenticate a user. -
defaultGeneratePasswordHash(
String password) → Future< String> - The default generate password hash, using argon2id.
-
defaultValidatePasswordHash(
String password, String email, String hash, {void onValidationFailure({required String passwordHash, required String storedHash})?, void onError(Object e)?}) → Future< bool> - The default validation password hash.
Typedefs
-
PasswordHashGenerator
= Future<
String> Function(String password) - Callback for generation of the hash password
-
PasswordHashValidator
= Future<
bool> Function(String password, String email, String hash, {void onError(Object e)?, void onValidationFailure({required String passwordHash, required String storedHash})?}) - Callback to validate the hash used by PasswordHashGenerator
-
SendPasswordResetEmailCallback
= Future<
bool> Function(Session session, UserInfo userInfo, String validationCode) - Callback for emailing password resets.
-
SendValidationEmailCallback
= Future<
bool> Function(Session session, String email, String validationCode) - Callback for emailing validation codes at account setup.
-
UserImageGenerator
= Future<
Image> Function(UserInfo userInfo) - Generates a default user image (avatar) for a user that hasn't uploaded a user image.
-
UserInfoCreationCallback
= Future<
bool> Function(Session session, UserInfo userInfo, String? method) - Callback for user creation.
-
UserInfoUpdateCallback
= Future<
void> Function(Session session, UserInfo userInfo) - Callback for user info being updated.