protocol 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.
EmailAuth
Database bindings for a sign in with email.
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.
EmailCreateAccountRequestTable
EmailFailedSignIn
Database table for tracking failed email sign-ins. Saves IP-address, time, and email to be prevent brute force attacks.
EmailFailedSignInTable
EmailPasswordReset
Information about an email password reset.
EmailReset
Database bindings for an email reset.
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.
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.
UserImage
Database bindings for a user image.
UserImageTable
UserInfo
Information about a user. The UserInfo should only be shared with the user itself as it may contain sensative 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.
UserInfoPublic
Information about a user that can safely be publically accessible.
UserInfoTable
Users
Business logic for handling users.
UserSettingsConfig
User settings.

Extensions

RandomString
An extension for generating random strings.
UserInfoExtension
Convenience methods for the UserInfo class.
UserInfoMethods
Additional methods for UserInfo.

Properties

tEmailAuth EmailAuthTable
read / write
tEmailCreateAccountRequest EmailCreateAccountRequestTable
read / write
tEmailFailedSignIn EmailFailedSignInTable
read / write
tEmailReset EmailResetTable
read / write
tGoogleRefreshToken GoogleRefreshTokenTable
read / write
tUserImage UserImageTable
read / write
tUserInfo UserInfoTable
read / write

Enums

AuthenticationFailReason
Defines a reason for a failed sign in.
UserImageType
Defines the format of stored user images.

Typedefs

EmailAuthExpressionBuilder = Expression Function(EmailAuthTable)
EmailCreateAccountRequestExpressionBuilder = Expression Function(EmailCreateAccountRequestTable)
EmailFailedSignInExpressionBuilder = Expression Function(EmailFailedSignInTable)
EmailResetExpressionBuilder = Expression Function(EmailResetTable)
GoogleRefreshTokenExpressionBuilder = Expression Function(GoogleRefreshTokenTable)
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.
UserImageExpressionBuilder = Expression Function(UserImageTable)
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.
UserInfoExpressionBuilder = Expression Function(UserInfoTable)
UserInfoUpdateCallback = Future<void> Function(Session session, UserInfo userInfo)
Callback for user info being updated.