EmailIdp class
Main class for the email identity provider. The methods defined here are intended to be called from an endpoint.
The admin property provides access to EmailIdpAdmin, which contains
admin-related methods for managing email-backed accounts.
The utils property provides access to EmailIdpUtils, which contains
utility methods for working with email-backed accounts. These can be used
to implement custom authentication flows if needed.
If you would like to modify the authentication flow, consider creating custom implementations of the relevant methods.
Constructors
- EmailIdp(EmailIdpConfig config, {required TokenManager tokenManager, AuthUsers authUsers = const AuthUsers(), UserProfiles userProfiles = const UserProfiles()})
-
Creates a new instance of EmailIdp.
factory
Properties
- admin → EmailIdpAdmin
-
Admin operations to work with email-backed accounts.
final
- config → EmailIdpConfig
-
The configuration for the email identity provider.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- utils → EmailIdpUtils
-
Utility functions for the email identity provider.
final
Methods
-
finishPasswordReset(
Session session, {required String finishPasswordResetToken, required String newPassword, Transaction? transaction}) → Future< UuidValue> - Completes a password reset request by setting a new password.
-
finishRegistration(
Session session, {required String registrationToken, required String password, Transaction? transaction}) → Future< AuthSuccess> - Completes a new account registration, creating a new auth user with a profile and attaching the given email account to it.
-
login(
Session session, {required String email, required String password, Transaction? transaction}) → Future< AuthSuccess> - Logs in the user and returns a new session.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
startPasswordReset(
Session session, {required String email, Transaction? transaction}) → Future< UuidValue> -
Requests a password reset for
email. -
startRegistration(
Session session, {required String email, Transaction? transaction}) → Future< UuidValue> - Starts the registration for a new user account with an email-based login associated to it.
-
toString(
) → String -
A string representation of this object.
inherited
-
verifyPasswordResetCode(
Session session, {required UuidValue passwordResetRequestId, required String verificationCode, Transaction? transaction}) → Future< String> - Verifies a password reset code and returns a finishPasswordResetToken that can be used to finish the password reset.
-
verifyRegistrationCode(
Session session, {required UuidValue accountRequestId, required String verificationCode, Transaction? transaction}) → Future< String> - Verifies an account request code and returns a token that can be used to complete the account creation.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited