feat: citizenship built
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
import crypto from "crypto"
|
||||
import crypto from "crypto";
|
||||
|
||||
export function generatePkce() {
|
||||
const verifier = crypto.randomBytes(32).toString("base64url");
|
||||
|
||||
+2
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user