MCPcopy
hub / github.com/simstudioai/sim / generateOTP

Function generateOTP

apps/sim/lib/core/security/otp.ts:54–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52
53/** Returns a cryptographically random 6-digit OTP code. */
54export function generateOTP(): string {
55 return randomInt(100000, 1000000).toString()
56}
57
58/**
59 * OTP values are stored as `"code:attempts"` (e.g. `"654321:0"`).

Callers 2

route.tsFile · 0.90
route.tsFile · 0.90

Calls 2

randomIntFunction · 0.85
toStringMethod · 0.45

Tested by

no test coverage detected