Compare commits

...

2 Commits

Author SHA1 Message Date
Lucas Smith
369357aadd fix: passkey login (#1067)
## Description

Fixed issue where passkeys do not work on https deployments.
2024-03-29 12:56:23 +07:00
David Nguyen
117d9427c3 fix: passkey login 2024-03-28 19:06:19 +08:00

View File

@@ -132,7 +132,10 @@ export const authRouter = router({
}),
createPasskeySigninOptions: procedure.mutation(async ({ ctx }) => {
const sessionIdToken = parse(ctx.req.headers.cookie ?? '')['next-auth.csrf-token'];
const cookies = parse(ctx.req.headers.cookie ?? '');
const sessionIdToken =
cookies['__Host-next-auth.csrf-token'] || cookies['next-auth.csrf-token'];
if (!sessionIdToken) {
throw new Error('Missing CSRF token');