MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / hashOpaqueToken

Function hashOpaqueToken

apps/api/src/lib/tokens/token-utils.ts:17–18  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

15 * password-reset / verification / refresh tokens are not immediately usable.
16 */
17export const hashOpaqueToken = (token: string): string =>
18 createHmac("sha256", env.JWT_SECRET).update(token).digest("hex");

Callers 15

registerMethod · 0.90
createMethod · 0.90
refreshMethod · 0.90
revokeMethod · 0.90
requestMethod · 0.90
issueRawTokenForTestsMethod · 0.90
completeMethod · 0.90
issueChallengeMethod · 0.90
verifyTotpLoginMethod · 0.90
verifyRecoveryLoginMethod · 0.90
verifyMethod · 0.90
resendMethod · 0.90

Calls 1

updateMethod · 0.80

Tested by 4

seedResetTokenRowFunction · 0.72
seedResetTokenFunction · 0.72
seedVerificationTokenFunction · 0.72