Skip to content

Commit

Permalink
fix: add pkce and nonce cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
dotslashf committed Aug 19, 2024
1 parent 0aa4552 commit f8f4d57
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/server/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,27 @@ export const authOptions: NextAuthOptions = {
domain: "." + "arsiptemplate.app",
},
},
pkceCodeVerifier: {
name: `${cookiePrefix}next-auth.pkce.code_verifier`,
options: {
httpOnly: true,
sameSite: "lax",
path: "/",
secure: process.env.NODE_ENV === "production" ? true : false,
maxAge: 900,
domain: "." + "arsiptemplate.app",
},
},
nonce: {
name: `${cookiePrefix}next-auth.nonce`,
options: {
httpOnly: true,
sameSite: "lax",
path: "/",
secure: process.env.NODE_ENV === "production" ? true : false,
domain: "." + "arsiptemplate.app",
},
},
},
callbacks: {
session: async ({ session, user }) => {
Expand Down

0 comments on commit f8f4d57

Please sign in to comment.