module 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
AuthKeyUpdateTable
EmailAuth
Database bindings for a sign in with email.
EmailAuthInclude
EmailAuthIncludeList
EmailAuthRepository
EmailAuthTable
EmailAuthUpdateTable
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
EmailCreateAccountRequestUpdateTable
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
EmailFailedSignInUpdateTable
EmailPasswordReset
Information about an email password reset.
EmailReset
Database bindings for an email reset.
EmailResetInclude
EmailResetIncludeList
EmailResetRepository
EmailResetTable
EmailResetUpdateTable
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
GoogleRefreshTokenUpdateTable
PasswordValidationFailed
Validation failed because the computed password hash did not match the stored hash.
PasswordValidationResult
Represents the result of validating a plaintext password against a stored password hash.
PasswordValidationSuccess
Validation succeeded; the provided password matches the stored hash.
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.
UserImage
Database bindings for a user image.
UserImageInclude
UserImageIncludeList
UserImageRepository
UserImageTable
UserImageUpdateTable
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
UserInfoUpdateTable
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

defaultGeneratePasswordHash(String password) Future<String>
The default generate password hash, using argon2id.
defaultValidatePasswordHash({required String password, required String email, required String hash}) Future<PasswordValidationResult>
The default validation password hash.

Typedefs

PasswordHashGenerator = Future<String> Function(String password)
Callback for generation of the hash password
PasswordHashValidator = Future<PasswordValidationResult> Function({required String email, required String hash, required String password})
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.