Build a User Management App with Nuxt 3: Can't login with magic link in SSR mode #20443
Replies: 2 comments
-
I agree wholeheartedly with this recommendation. It would be a quick and easy thing to do to update the documentation for this. I was building my first Nuxt app using the User Management App tutorial, and I had no clue why the magick link registration step wasn't working until I found this bug/discussion. Help us newbies out by updating the docs for this, please. :) |
Beta Was this translation helpful? Give feedback.
-
I had this issue, in case someone else has it too: It was not related to nuxt SSR, but my local edge function that generated a magic link was not using the same supabase instance as my nuxt app (it was using my production tokens). |
Beta Was this translation helpful? Give feedback.
-
Improve documentation
Link
https://supabase.com/docs/guides/getting-started/tutorials/with-nuxt-3?database-method=dashboard
Describe the problem
Can not login with the magic link. The example always display
<Auth>
componentDescribe the improvement
Add
ssr: false
tonuxt.config.ts
solve the problem, but I still have no clue how to make it work with SSR mode.Since Nuxt3 has
ssr: true
by default, I think the tutorial should mention details about how Supabase auth works with SSR (server-side-rendering) / CSR (client-side-rending) applicationI don't know why the magic link doesn't work is SSR mode, but my guess is
useSupabaseUser()
was run on server-side and redirect to login page (and lost the token) instead of logging user in.Additional context
package.json
nuxt.config.ts
Beta Was this translation helpful? Give feedback.
All reactions