Skip to main content

generate_password_reset_token

Generates a JSON Web Token (JWT) for password resets that includes the user's email and an expiration timestamp based on system settings.

def generate_password_reset_token(
email: string
) - > string

Generates a signed JWT token used to authenticate password reset requests for a specific user email.

Parameters

NameTypeDescription
emailstringThe user's email address to be embedded as the subject claim in the token.

Returns

TypeDescription
stringA signed JWT string containing expiration, not-before, and subject claims, used for secure identity verification during the reset process.