Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it secure to set the cookie to sameSite: "none"? #6

Open
maiieul opened this issue Jun 12, 2023 · 0 comments
Open

Is it secure to set the cookie to sameSite: "none"? #6

maiieul opened this issue Jun 12, 2023 · 0 comments

Comments

@maiieul
Copy link

maiieul commented Jun 12, 2023

In pages/api/auth/[...nextauth].ts, you have set sameSite to "none":

export const authOptions: NextAuthOptions = {
  providers: [
    GithubProvider({
      clientId: process.env.GITHUB_ID,
      clientSecret: process.env.GITHUB_SECRET,
    }),
  ],
  cookies: {
    sessionToken: {
      name: `${useSecureCookies ? "__Secure-" : ""}next-auth.session-token`,
      options: {
        httpOnly: true,
        sameSite: "none",
        path: "/",
        domain: `.next-auth-capacitor.vercel.app`,
        secure: useSecureCookies,
      },
    },
  },
  theme: {
    colorScheme: "light",
  },
};

Couldn't this lead to security issues?

@maiieul maiieul changed the title Is it secure to the the cookie to sameSite: "none"? Is it secure to set the cookie to sameSite: "none"? Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant