You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm struggling with an issue with Nuxt 3 and auth.sidebase.io
Everything works by far in development. However, in production, I have this error when the build finishes. I've checked the docs to set up the library and yet didn't work. I'm using Cloudflare Pages and I've configured the .env
import GoogleProvider from "next-auth/providers/google";
import { NuxtAuthHandler } from "#auth";
export default NuxtAuthHandler({
secret: useRuntimeConfig().authSecret,
providers: [
// @ts-expect-error Use .default here for it to work during SSR.
GoogleProvider.default({
clientId: process.env.NUXT_GOOGLE_CLIENT_ID,
clientSecret: process.env.NUXT_GOOGLE_SECRET,
}),
],
callbacks: {},
});
adittional information:
I thought it was a server problem, however, I created a ping route to check if the server is running and it returns 200. The problem is this endpoint specifically "/api/auth/session": 500
Package version:
"@sidebase/nuxt-auth": "^0.9.4"
Reproduction
no reproduction available.
Describe the bug
[GET] "/api/auth/session": 500 in production
Additional context
It only works in development. Production fails
Logs
Uncaught (in promise) FetchError: [GET] "/api/auth/session": 500
GET https://mywebsite.dev/api/auth/session 500 (Internal Server Error)
The text was updated successfully, but these errors were encountered:
Sadly NuxtAuth with the authjs does not run on cloudflare page as it depends on the Nuxt server. As we are still using NextAuth under the hood, this restriction cannot be resolved.
I recommend that you use one of the following packages that do support cloudflare pages:
Environment
I'm struggling with an issue with Nuxt 3 and auth.sidebase.io
Everything works by far in development. However, in production, I have this error when the build finishes. I've checked the docs to set up the library and yet didn't work. I'm using Cloudflare Pages and I've configured the .env
Here's the issue in production:
Here's my nuxt.config.ts:
and here's my ~server/api/auth/[...].ts:
adittional information:
I thought it was a server problem, however, I created a ping route to check if the server is running and it returns 200. The problem is this endpoint specifically "/api/auth/session": 500
Package version:
"@sidebase/nuxt-auth": "^0.9.4"
Reproduction
no reproduction available.
Describe the bug
[GET] "/api/auth/session": 500 in production
Additional context
It only works in development. Production fails
Logs
Uncaught (in promise) FetchError: [GET] "/api/auth/session": 500 GET https://mywebsite.dev/api/auth/session 500 (Internal Server Error)
The text was updated successfully, but these errors were encountered: