Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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. */
54
export
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.ts
File · 0.90
route.ts
File · 0.90
Calls
2
randomInt
Function · 0.85
toString
Method · 0.45
Tested by
no test coverage detected