type
PasswordResetConfig
Password-recovery token lifetime and delivery callback.
Arguments
| Argument | Type | Description |
|---|---|---|
TokenDuration | time.Duration | Lifetime of a reset token; zero defaults to one hour. |
Send | func(context.Context, | Delivers the newly issued token; an error prevents a success response. |
Full signature
type PasswordResetConfig struct {
// TokenDuration is the lifetime of a reset token. Zero defaults to one hour.
TokenDuration time.Duration
// Send delivers a newly issued token. It should enqueue or send the message
// before returning; returning an error prevents a success response.
Send func(context.Context, PasswordResetNotification) error
}Related types
PasswordResetNotificationTrusted password-reset delivery payload.