nuxt-community / auth-module

Zero-boilerplate authentication support for Nuxt 2
https://auth.nuxtjs.org
MIT License
1.93k stars 924 forks source link

how to set cookie samesite in @nuxtjs/auth-next #1727

Closed NitichaiSawangsai closed 2 years ago

NitichaiSawangsai commented 2 years ago

I'm wondering how to set cookie samesite, do you have any suggestions? nuxtjs project used in aws

file nuxt.config.js

auth: {
    localStorage: false,
    redirect: {
      login: '/sign-in',
      callback: '/oauth2/callback',
      logout: '/sign-in',
      home: '/dashboard'
    },
    strategies: {
      cognito: {
        scheme: '~/schemes/cognitoScheme'
      }
    },
    cookie: {
      options: {
        secure: true
      }
    }
vipinsmarty commented 1 year ago

Any idea how this was resolved? How to set samesite on nuxtjs?

blombard commented 7 months ago

For Google users:

    cookie: {
      options: {
        secure: true,
        sameSite: 'Strict', // 'Strict', 'Lax' or 'None'
      }
    }