Closed sun-ergo-s closed 11 months ago
+1 on this -- I'm hitting the same issue. Works on Vercel just fine though.
@sun-ergo-s I figured out a fix for this!
The issue was actually in Nitro -- it was not handling the Set-Cookie
header properly. Here is the fix: https://github.com/unjs/nitro/pull/1452
You can pull in the latest, edge version of Nitro following the steps here: https://github.com/Hebilicious/authjs-nuxt/issues/51#issuecomment-1653419171
Specifically adding to my package.json
file:
"resolutions": {
"nitropack": "npm:nitropack-edge@latest"
},
Environment
This is my localhost environment:
I don't know Netlify environment.
Reproduction
https://github.com/sun-ergo-s/testing-nuxt-on-netlify
Deployed on Netlify: https://whimsical-biscotti-346a06.netlify.app/
Describe the bug
I have a clean install of
Nuxt@3.5.3
application with@sidebase/nuxt-auth@0.5.0
(also tried0.6.0-beta.2
).After deploying on Netlify I got the
OAuthCallback
error using Google/Facebook provider in URL after redirect.On localhost everything works fine.
I have defined
AUTH_ORIGIN
andNEXTAUTH_URL
variables on Netlify and also in config file:Additional context
Works on Vercel. I also tried this solution but it didn't work:
add cookies config
Originally posted by @desenmeng in https://github.com/nextauthjs/next-auth/discussions/6898#discussioncomment-5308820
Logs