pub struct EmailVerificationConfig {
pub verification_token_expiry: Duration,
pub send_email_notifications: bool,
pub send_on_sign_up: Option<bool>,
pub require_verification_for_signin: bool,
pub auto_verify_new_users: bool,
pub send_on_sign_in: 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: DurationHow long a verification token stays valid. Default: one hour.
send_email_notifications: boolWhether to send email notifications (on sign-up). Default: true.
send_on_sign_up: Option<bool>Send the verification challenge during password sign-up. When unset, the email/password requirement decides, as in the upstream defaults.
require_verification_for_signin: boolWhether email verification is required before sign-in. Default: false.
auto_verify_new_users: boolWhether to auto-verify newly created users. Default: false.
send_on_sign_in: boolWhen true, automatically send a verification email on sign-in if the user is unverified. Default: false.
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).
Trait Implementations§
Source§impl Clone for EmailVerificationConfig
impl Clone for EmailVerificationConfig
Source§impl Debug for EmailVerificationConfig
impl Debug for EmailVerificationConfig
Auto Trait Implementations§
impl !RefUnwindSafe for EmailVerificationConfig
impl !UnwindSafe for EmailVerificationConfig
impl Freeze for EmailVerificationConfig
impl Send for EmailVerificationConfig
impl Sync for EmailVerificationConfig
impl Unpin for EmailVerificationConfig
impl UnsafeUnpin for EmailVerificationConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more