Skip to main content

verify_password_reset_token

Decodes and validates a JWT password reset token using the application's secret key and returns the subject identifier if valid, or None if the token is invalid.

def verify_password_reset_token(
token: str
) - > str | None

Decodes and validates a JWT password reset token to retrieve the associated user identity.

Parameters

NameTypeDescription
tokenstrThe JSON Web Token string provided by the user to authorize a password reset operation.

Returns

TypeDescription
`strNone`