fix(auth): revoke stale sessions and tokens

Revoked or rotated credentials must stop working despite stale KV
replicas. Track the live token and revocations in D1 and preserve
immutable identity bindings rather than trusting a recycled login.
This commit is contained in:
翅膀 committed 2026-10-23 23:22:52 +08:00
1 parent 5ff2338b48
commit 2bdce90776
5 files changed
+285 -22

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ async function userOctokit(
event: H3Event,
userId: string,
): Promise<Awaited<ReturnType<typeof getUserOctokit>>> {
return getUserOctokit(userId, cfEnv(event).KV);
return getUserOctokit(userId, cfEnv(event));
}
function fail(event: H3Event, status: number, error: string): Record<string, unknown> {