Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supabase Authentication redirects are breaking OG Images #100

Open
T-Zahil opened this issue Oct 18, 2023 · 2 comments
Open

Supabase Authentication redirects are breaking OG Images #100

T-Zahil opened this issue Oct 18, 2023 · 2 comments

Comments

@T-Zahil
Copy link

T-Zahil commented Oct 18, 2023

Describe the bug

Hi there 👋

I'm having a little issue with this module. The og_image page isn't working when I use the official Nuxt module (https://supabase.nuxtjs.org).

I strongly suspect this is because of their new auto-redirect when not logged in. I try to add the og_image page to the exclude array, but no luck.

I'm not sure if I should post this issue here or on the Supabase module repo, feel free to tell me if I'm wrong.

I provided a reproduction, but I can't find a way to add and save a .env file though 😅 you need to create one and add this:

SUPABASE_URL="https://example.supabase.co" SUPABASE_KEY="<your_key>"

Reproduction

https://stackblitz.com/edit/nuxt-starter-j2gyhh

System / Nuxt Info

No response

EDIT: It works when I completely disable the "redirect" option from the supabase module, but doesn't work if I write ['/*'] in the exclude option 🤔

@peterkimzz
Copy link

Same configuration, same problem, but I still get error 500 when I disable the redirect option of Supabase.

@harlan-zw
Copy link
Collaborator

harlan-zw commented Oct 30, 2023

Hm, this is a tricky one. Basically, the Nitro server needs to fetch the route that you're trying to generate the og image for to get the metadata.

If you're redirecting on the root path though then you're probably going to run into other issues with link sharing.

I'll have a think about what can be done, we can at least provide a better error message.

@harlan-zw harlan-zw changed the title Error 500: The path / is missing the og-image payload. Supabase Authentication redirects are breaking OG Images Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants