can we use vercel domain redirect with google auth...
# help
p
can we use vercel domain redirect with google auth yet ?
n
Hello @Paul! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
🆕 Google Auth Redirect with Vercel hosted domains
b
Can you explain what you mean by domain redirect here?
n
Google Auth Redirect with Vercel hosted domains
b
Ah, it looks like you're posting here and on Reddit at the same time. What you're asking for is wildcard URL support in Supabase. This exists now, using glob syntax. So in the supabase dashboard where you whitelist your redirect URLs, just add a ** like this: https://google.com/ * * (no spaces there, I just couldn't type the two asterisks together in Discord.
Copy code
https://google.com/**
p
can it work like vercel?
Copy code
https://**.vercel.app/
Copy code
const signInWithGoogle = async () => {
    const {user, session, error} = await supabase.auth.signIn(
      {
        provider: 'google',
      },
      {
        redirectTo: 'https://s3-bucket-npi.vercel.app/home',
      },
    )

    if (error) {
      popupValidation('error', error.message)
    }
  }
b
This should work, yes. Give it a try.
p
i think i have some wrong here
i just get redirect to this https://s3-bucket-npi.vercel.app/#
Maybe try a single asterisk (*)
p
but everything is correct in terms of placement in the settings
single * didnt work
b
make sure you're on the latest version of the javascript api
what version do you have in your project
p
react 18
b
supabase versioon?
p
1.35.3
b
That's current, yes. According to the PR, * should work.
p
😢
b
According to your redirect url, it will ONLY redirect to https://*.vercel.app/home
p
im hoping it would lol
b
Maybe post on Github discussions, I can ask the Auth team to look at it.
Also maybe look at the PR and see if you can find the issue?
p
thanks posted on both
tweaked a few things and now getting redirected to https://s3-directory-npi.vercel.app/home#access_token=xxx with a 404
guess it can't be done without a standard domain
b
might want to add ** to the end of the redirect URL
p
nope that didn't work either same token 404
b
Yeah post a github discussion and I'll mention it to the auth team. I looked a the PR and it should be using regex to match.
p
i have posted it on the vercel discussions too
b
Kang Ming responded in the github discussion.