EmailIdpConfig constructor
const
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.
Implementation
const EmailIdpConfig({
required this.secretHashPepper,
this.fallbackSecretHashPeppers = const [],
this.registrationVerificationCodeLifetime = const Duration(minutes: 15),
this.registrationVerificationCodeAllowedAttempts = 3,
this.registrationVerificationCodeGenerator =
defaultVerificationCodeGenerator,
this.passwordResetVerificationCodeLifetime = const Duration(minutes: 15),
this.passwordResetVerificationCodeAllowedAttempts = 3,
this.passwordResetVerificationCodeGenerator =
defaultVerificationCodeGenerator,
this.sendRegistrationVerificationCode,
this.sendPasswordResetVerificationCode,
this.onPasswordResetCompleted,
this.failedLoginRateLimit = const RateLimit(
maxAttempts: 5,
timeframe: Duration(minutes: 5),
),
this.passwordValidationFunction =
defaultRegistrationPasswordValidationFunction,
this.maxPasswordResetAttempts = const RateLimit(
timeframe: Duration(hours: 1),
maxAttempts: 3,
),
this.secretHashSaltLength = 16,
this.onAfterAccountCreated,
});