feat: logout

This commit is contained in:
Ivan Rezchikov
2026-06-18 22:52:49 +03:00
parent 6c89f21039
commit dfc3dd2065
13 changed files with 172 additions and 128 deletions
+11
View File
@@ -0,0 +1,11 @@
import crypto from "crypto"
export function generatePkce() {
const verifier = crypto.randomBytes(32).toString("base64url");
const challenge = crypto.createHash("sha256").update(verifier).digest("base64url");
return { verifier, challenge };
}
export function generateState() {
return crypto.randomBytes(16).toString("hex");
}