Github OAuth Authorization callback url using Vercel

When I set up my app’s OAuth in Github, I set it to localhost. When you deploy to Vercel, what should you set it to? I can set it to the main domain, but does that work for staging domains? I’m assuming it will no longer work for localhost.

How do you deal with this issue?

I create one OAuth app per site, I have one for localhost and one for my vercel subdomain:


I use https://tina-starter-alpaca-eight.vercel.app and not https://tina-starter-alpaca.dirtyf.vercel.app (which is an alias but it does not work with it)

Ok, that will work. It does mean that the myriad sub domains Vercel creates per branch can’t be edited, but I suppose there’s not much to be done about that, unless maybe the auth process can set a cookie on the domain instead of setting in localstorage? I’ll have to peek at how vercel does sub domains again, it might not be secure if the subdomain isn’t specific enough.