function createPasswordResetToken
createPasswordResetToken(userId: string): Promise<string>

Signs a password reset token for userId, valid for an hour. The token isn't single-use by itself: requestPasswordReset stores it, and resetPassword marks it used.

Parameters

userId: string

Return Type

Promise<string>

Usage

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