EmailIdpConfig class

Configuration options for the email account module.

Inheritance
Implementers

Constructors

EmailIdpConfig({required String secretHashPepper, List<String> fallbackSecretHashPeppers = const [], Duration registrationVerificationCodeLifetime = const Duration(minutes: 15), int registrationVerificationCodeAllowedAttempts = 3, String registrationVerificationCodeGenerator() = defaultVerificationCodeGenerator, Duration passwordResetVerificationCodeLifetime = const Duration(minutes: 15), int passwordResetVerificationCodeAllowedAttempts = 3, String passwordResetVerificationCodeGenerator() = defaultVerificationCodeGenerator, SendRegistrationVerificationCodeFunction? sendRegistrationVerificationCode, SendPasswordResetVerificationCodeFunction? sendPasswordResetVerificationCode, OnPasswordResetCompletedFunction? onPasswordResetCompleted, RateLimit failedLoginRateLimit = const RateLimit(maxAttempts: 5, timeframe: Duration(minutes: 5)), PasswordValidationFunction passwordValidationFunction = defaultRegistrationPasswordValidationFunction, RateLimit maxPasswordResetAttempts = const RateLimit(timeframe: Duration(hours: 1), maxAttempts: 3), int secretHashSaltLength = 16, AfterAccountCreatedFunction? onAfterAccountCreated})
Create a new email account configuration.
const

Properties

failedLoginRateLimit → RateLimit
The maximum number of failed logins for the same email.
final
fallbackSecretHashPeppers → List<String>
Optional fallback peppers for validating passwords and verification codes created with previous peppers.
final
hashCode → int
The hash code for this object.
no setterinherited
maxPasswordResetAttempts → RateLimit
How many password reset attempts are allowed for the same email.
final
onAfterAccountCreated → AfterAccountCreatedFunction?
Callback to be invoked after a new email account has been created.
final
onPasswordResetCompleted → OnPasswordResetCompletedFunction?
Callback to be invoked after a password reset is successfully completed.
final
passwordResetVerificationCodeAllowedAttempts → int
How many attempts are permitted for a single password reset verification code (during the passwordResetVerificationCodeLifetime window).
final
passwordResetVerificationCodeGenerator → String Function()
Function returning the password rest verification code.
final
passwordResetVerificationCodeLifetime → Duration
The time for password reset verification codes to be valid.
final
passwordValidationFunction → PasswordValidationFunction
Function to check passwords against a policy during registration and password change.
final
registrationVerificationCodeAllowedAttempts → int
How many attempts are permitted for an email verification code (during the registrationVerificationCodeLifetime window).
final
registrationVerificationCodeGenerator → String Function()
Function returning the registration verification code.
final
registrationVerificationCodeLifetime → Duration
The time for the registration email verification code to be valid.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
secretHashPepper → String
The pepper used for hashing passwords and verification codes.
final
secretHashSaltLength → int
The length of the random hash in bytes to be used for each password.
final
sendPasswordResetVerificationCode → SendPasswordResetVerificationCodeFunction?
Callback to be invoked for sending outgoing password reset emails.
final
sendRegistrationVerificationCode → SendRegistrationVerificationCodeFunction?
Callback to be invoked for sending outgoing registration emails for the email address verification.
final
type → Type
The type of the provider that this builder creates. Used to store the provider in the AuthConfig.
no setterinherited

Methods

build({required TokenManager tokenManager, required AuthUsers authUsers, required UserProfiles userProfiles}) → EmailIdp
Builds a new instance of the identity provider.
override
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