EmailAccountConfig class

Configuration options for the email account module.

Constructors

EmailAccountConfig.new({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, RateLimit failedLoginRateLimit = (maxAttempts: 5, timeframe: const Duration(minutes: 5)), PasswordValidationFunction passwordValidationFunction = defaultRegistrationPasswordValidationFunction, RateLimit maxPasswordResetAttempts = (timeframe: const Duration(hours: 1), maxAttempts: 3), int passwordHashSaltLength = 16})
Create a new email account configuration.

Properties

failedLoginRateLimit RateLimit
The maximum number of failed logins for the same email OR from the same IP address.
final
hashCode int
The hash code for this object.
no setterinherited
maxPasswordResetAttempts RateLimit
How many password reset attempts are allowed for the same email OR from the same IP address.
final
passwordHashSaltLength int
The length of the random hash in bytes to be used for each password.
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
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

Methods

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