Closed SeraVault closed 2 years ago
Hi @SeraVault, nothing has changed on login between those two versions. Can you provide a reproduction ?
How do you deploy your project @SeraVault ?
I'm just using a local dev server at the moment (nuxt dev). I'll see if I can provide a reproduction. Thanks.
I am currently struggling with the same issue. Has a cause been for this issue been found? When I try magic link login on my local dev server I get this line in console: [Vue Router warn]: No match found for location with path "/api/_supabase/session"
The url looks like this after the issue: http://localhost:3000/login#error_code=404&error_description=User+not+found
I had not changed anything on the login side when it stopped working. I tried reverting the module to 1.1.10 as stated above but that also didn't fix my issue.
I am not able to reproduce this error. Can one of you provide a stackblitz reproduction ? 🙏
@larbish I hope this helps: reproduction
I'm very new to nuxt3 and supabase so it's most likely a mistake on my part. Please let me know if this reproduction is complete/helpful or I will supplement it with whatever you need.
@SeraVault I had the same issue and it was just that i missed to update the supabase auth settings with the github infos: github:
then update supabase under github enabled:
this helped me to get rid of the 404...
I was going to open a new issue, but I believe I've encountered this issue on the auth flow of the demo site itself. Check out this 5 second recording I've made below:
@nberlette concerning the demo, I tried something in local and have updated the auth redirect URL of the supabase dashboard to localhost:3000
. I simply forgot to set it back to the good URL afterward. Sorry for that, it should be fixed.
I've been having this same issue using Discord and Google auth. It was working perfectly for a while, and a month or so ago, it just stopped working and I receive these errors in the console.
POST http://localhost:3000/api/_supabase/session 404 (Not Found)
Uncaught (in promise) FetchError: 404 Not Found (/api/_supabase/session)
at async Object.callback (supabase.client.mjs:22:7)
Last night I reset Discord creds to test, but still same issue :/
I was experiencing the same issue and when i went back to 0.1.10 is started working again. huh. Will provide my repo soon.
Reverting @nuxtjs/supabase
to 0.1.10
has worked for me
Are you still facing this issue with v0.2.0
?
@larbish I am not. It is working well.
Hi, @larbish
I got same issue in only production mode, not localhost.
const { data, error } = await supabase.auth.verifyOtp({
type: "magiclink",
email: form.email,
token: form.token,
});
console.log(data)
The console.log
shows an user's data successfully, but failed to request /api/_supabase/session
only in production. So SupabaseUser()
has noting.
Here is my info,
Darwin
v16.18.0
3.0.0
1.0.0
yarn@1.22.19
vite
runtimeConfig
, modules
, tailwindcss
, supabase
@nuxtjs/supabase@0.3.0
, @nuxtjs/tailwindcss@6.1.3
-
@peterkimzz what command do you use to deploy your Nuxt app?
@Atinux I didn't override any option of the Nuxt project configuration and Vercel build option. I created a project by Vercel guideline.
{
"private": true,
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev -p 3003",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
"test": "nuxt typecheck"
},
"devDependencies": {
"@nuxtjs/supabase": "0.3.0",
"@nuxtjs/tailwindcss": "6.1.3",
"@tailwindcss/forms": "0.5.3",
"husky": "8.0.2",
"nuxt": "3.0.0"
},
"dependencies": {
"@heroicons/vue": "2.0.13",
"@supabase/supabase-js": "2.1.1"
}
}
Try to overwrite and set "npm run build"
I have the same error when deploying to production on Netlify or Cloudflare Pages. Everything works fine locally.
I have tried npm run build
and npm run generate
commands and they both have the same result when my app is deployed and I try to logIn with Google.
Netlify error
POST https://admirable-baklava-3c95f7.netlify.app/api/_supabase/session 404
Cloudflare error
POST https://burpeefly.pages.dev/api/_supabase/session 405
Uncaught (in promise) FetchError: 405 (/api/_supabase/session)
at async Object.callback (entry.af57154f.js:5:118018)
My package.json
{
"private": true,
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@nuxtjs/supabase": "^0.3.0",
"@vicons/ionicons5": "^0.12.0",
"naive-ui": "^2.33.4",
"nuxt": "^3.0.0"
}
}
same here can it be the SITE_URL / BASE_URL ?
We don't advice to use the Supabase module with nuxt generate
since it's better to have an API endpoint running too for your app.
Leverage nuxt build
for Netlify instead.
it's a probleme with vercel, because of /api edge function proxy (i don't know yet how to resolve this issue)
I still have this issue, is there any fix for this?
When trying to login to supabase using useSupabaseClient() using v0.1.14, I'm getting a 404 error:
POST http://localhost:3000/api/_supabase/session 404 (Page not found: /api/_supabase/session)
It works fine on v 1.1.10. Is there any additional configuration necessary on v0.1.14?
Thanks