feat: citizenship built

This commit is contained in:
Ivan Rezchikov
2026-07-03 15:03:35 +03:00
parent c60ab9e8f9
commit 2eb0de5357
46 changed files with 1150 additions and 257 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
import crypto from "crypto"
import crypto from "crypto";
export function generatePkce() {
const verifier = crypto.randomBytes(32).toString("base64url");
+2 -1
View File
@@ -33,7 +33,8 @@ export async function getSessionUserId(): Promise<string | null> {
try {
const { payload } = await jwtVerify(token, getSecret());
return payload.sub ?? null;
} catch {
} catch (e) {
console.error("Session verification failed:", e);
return null;
}
}