pub struct EmailVerificationConfig {
pub verification_token_expiry: Option<Duration>,
pub send_email_notifications: bool,
pub require_verification_for_signin: bool,
pub send_on_sign_in: bool,
pub send_on_sign_up: Option<bool>,
pub auto_sign_in_after_verification: bool,
pub send_verification_email: Option<Arc<dyn SendVerificationEmail>>,
pub before_email_verification: Option<EmailVerificationHook>,
pub after_email_verification: Option<EmailVerificationHook>,
}Fields§
§verification_token_expiry: Option<Duration>How long a verification token stays valid. Default: one hour.
send_email_notifications: boolWhether sign-in sends through the default email provider. Default: true. Custom senders are independent of this setting.
require_verification_for_signin: boolWhether email verification is required before sign-in. Default: false.
send_on_sign_in: boolWhen true, automatically send a verification email on sign-in if the user is unverified. Default: false.
send_on_sign_up: Option<bool>Send for new unverified OAuth users; defaults to the provider verification requirement.
auto_sign_in_after_verification: boolWhen true, create a session after email verification and return the session token in the verify-email response. Default: false.
send_verification_email: Option<Arc<dyn SendVerificationEmail>>Optional custom email sender. When set this overrides the default
EmailProvider-based sending.
before_email_verification: Option<EmailVerificationHook>Hook invoked before email verification (before updating the user).
after_email_verification: Option<EmailVerificationHook>Hook invoked after email verification (after the user has been updated).
Implementations§
Source§impl EmailVerificationConfig
impl EmailVerificationConfig
Sourcepub fn verification_token_expiry(&self) -> Duration
pub fn verification_token_expiry(&self) -> Duration
Read the verification-token lifetime. Omission uses one hour.