MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / checkPassword

Function checkPassword

telemetry-dashboard/src/auth.ts:91–95  ·  view source on GitHub ↗
(env: Env, submitted: string)

Source from the content-addressed store, hash-verified

89}
90
91export async function checkPassword(env: Env, submitted: string): Promise<boolean> {
92 // A misconfigured deployment must not become an open dashboard.
93 if (!env.ADMIN_PASSWORD || !env.SESSION_SECRET) return false;
94 return equalsInConstantTime(submitted, env.ADMIN_PASSWORD);
95}
96
97export async function issueSession(env: Env): Promise<string> {
98 const now = Math.floor(Date.now() / 1000);

Callers 1

handleLoginSubmitFunction · 0.90

Calls 1

equalsInConstantTimeFunction · 0.85

Tested by

no test coverage detected