OAuthCallback error using sidebase/nuxt-auth@0.5.0 when loging with Google/Facebook provider

After deploying my Nuxt@3.5.3 application using @sidebase/nuxt-auth@0.5.0 to Netlify I got the OAuthCallback error when trying to log in using Google/Facebook provider.

On localhost everything works fine.

The documentation of the nuxt-auth says: “You must set the origin in production!”

I’m using both options.

  1. I have set AUTH_ORIGIN environment
  2. and also origin key in nuxt.config.ts both to https://example.com.

Maybe the error is caused by something else but I don’t know what can it be if the localhost app works fine.

Can somebody help?

What site is this about and how can we reproduce it?

I also made a minimal reproduction.

Works on localhost but returns OAuthCallback error on Netlify.

I have deployed the minimal reproduction here: https://whimsical-biscotti-346a06.netlify.app/

Works on Vercel and others…

I can see this error here: Function details | Functions | whimsical-biscotti-346a06 | Netlify:

with a related solution: [Apple] PKCE code_verifier cookie was missing · nextauthjs/next-auth · Discussion #6898 (github.com)

Thank you for your reply. But the solution didn’t work. Got the same error.

sorry, what site is being impacted?

This one with minimal reproduction of Nuxt 3 and nuxt-auth: https://whimsical-biscotti-346a06.netlify.app/

Yes, that’s the site you’ve shared above. As mentioned in the issue above, there seems to be some missing configuration which you need to ask the library authors. Netlify doesn’t maintain the library, so we don’t know what part of their configuration would throw that error.