mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
fix: passkey login
This commit is contained in:
@ -132,7 +132,10 @@ export const authRouter = router({
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
createPasskeySigninOptions: procedure.mutation(async ({ ctx }) => {
|
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) {
|
if (!sessionIdToken) {
|
||||||
throw new Error('Missing CSRF token');
|
throw new Error('Missing CSRF token');
|
||||||
|
|||||||
Reference in New Issue
Block a user