function verifyPasswordResetToken
verifyPasswordResetToken(token: string): Promise<PasswordResetPayload | null>

Returns the payload of a password reset token, or null when it is invalid, expired or another kind of token. Whether it was used is the caller's check.

Parameters

token: string

Return Type

Promise<PasswordResetPayload | null>

Usage

import { verifyPasswordResetToken } from "api/lib/jwt.ts";