Skip to main content

SendResetPassword

Trait SendResetPassword 

Source
pub trait SendResetPassword: Send + Sync {
    // Required method
    fn send<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        user: &'life1 Value,
        url: &'life2 str,
        token: &'life3 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             Self: 'async_trait;
}
Expand description

Trait for sending password reset emails.

When set in PasswordManagementConfig, this overrides the default EmailProvider-based reset email sending. The user is provided as a serialized serde_json::Value since AuthUser is not object-safe.

Required Methods§

Source

fn send<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, user: &'life1 Value, url: &'life2 str, token: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Self: 'async_trait,

Send a password reset notification.

  • user - The user as a serialized JSON value (from serde_json::to_value)
  • url - The full reset URL including the token
  • token - The raw reset token

Implementors§