AuthServices class

Global configuration for auth providers that are exposed through endpoints. This object is also used to manage the lifecycle of authentication tokens regardless of who issues the token.

Available extensions

Constructors

AuthServices({required TokenManagerBuilder<TokenManager> primaryTokenManagerBuilder, List<IdentityProviderBuilder<Object>> identityProviderBuilders = const [], List<TokenManagerBuilder<TokenManager>> additionalTokenManagerBuilders = const [], AuthUsers authUsers = const AuthUsers(), UserProfiles userProfiles = const UserProfiles()})
Creates a new AuthServices instance.

Properties

appleIdp AppleIdp

Available on AuthServices, provided by the AppleIdpGetter extension

Returns the AppleIdp instance from the AuthServices.
no setter
authUsers AuthUsers
Manager for managing auth users.
final
emailIdp EmailIdp

Available on AuthServices, provided by the EmailIdpGetter extension

Returns the EmailIdp instance from the AuthServices.
no setter
firebaseIdp FirebaseIdp

Available on AuthServices, provided by the FirebaseIdpGetter extension

Returns the FirebaseIdp instance from the AuthServices.
no setter
googleIdp GoogleIdp

Available on AuthServices, provided by the GoogleIdpGetter extension

Returns the GoogleIdp instance from the AuthServices.
no setter
hashCode int
The hash code for this object.
no setterinherited
passkeyIdp PasskeyIdp

Available on AuthServices, provided by the PasskeyIdpGetter extension

Returns the PasskeyIdp instance from the AuthServices.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tokenManager MultiTokenManager
The token manager that handles token lifecycle operations.
latefinal
userProfiles UserProfiles
Manager for managing user profiles.
final

Methods

authenticationHandler(Session session, String key) Future<AuthenticationInfo?>
Validates an authentication token and returns the associated authentication info.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance AuthServices
Returns the singleton instance of AuthServices used by the provider endpoints.
no setter

Static Methods

getIdentityProvider<T>() → T
Retrieves the identity provider of type T.
getTokenManager<T extends TokenManager>() → T
Retrieves the token manager of type T.
set({required List<TokenManagerBuilder<TokenManager>> tokenManagerBuilders, List<IdentityProviderBuilder<Object>> identityProviderBuilders = const [], AuthUsersConfig authUsersConfig = const AuthUsersConfig(), UserProfileConfig userProfileConfig = const UserProfileConfig()}) → void
Creates a new AuthServices instance and sets it as the global instance.