-
Notifications
You must be signed in to change notification settings - Fork 131
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
Auth across multiple subdomains #304
Comments
I have the same question. Would be nice to have an answer in 2024 |
Hi, we are solving this by passing the parent domain as the domain in the cookie options supabase: {
redirect: false,
cookieOptions: {
domain: process.env.NUXT_PUBLIC_COOKIE_DOMAIN,
},
}, |
Can you elaborate a little more on that? I've tried everything I can think of and I can't get it to work across subdomains. It still sets a value in localStorage, which prevents it from working across subdomains. How exactly are you signing the user in and then how are you getting the user value? |
For us, it just works by passing |
Hmm, weird. I've tried doing the same exact thing. It does correctly recognize the access_token and refresh_token cookies for |
I just tested this on our product and it correctly logs out across domains. I have to note that we are using an unpublished version from my PR #357. Wanna try it out too and see if it works there? |
Oh yeah, that's definitely gotta be the solution! How can I use your version? |
It is not easy at the moment, I had to use a git submodule and put this into export default defineNuxtConfig({
modules: [
'./modules/supabase-nuxt/src/module.ts',
...
], ... |
Hello, I would like to make my auth sync across multiple subdomains domain.com -> a.domain.com
Similarly to
https://github.com/orgs/supabase/discussions/5742
Is there a convenient way to handle this via the nuxt module?
The text was updated successfully, but these errors were encountered: