mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 18:05:11 +03:00
Merge pull request #9330 from supabase/chore/use-vercel-url-for-redirect
add new env vars
This commit is contained in:
2 files changed
+10
-2
No files matched your search
@@ -16,7 +16,11 @@ const Landing = () => {
|
||||
const { error } = await auth.signInWithOAuth({
|
||||
provider: 'github',
|
||||
options: {
|
||||
redirectTo: `${process.env.NEXT_PUBLIC_SITE_URL}?auth=true`,
|
||||
redirectTo: `${
|
||||
process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview'
|
||||
? process.env.NEXT_PUBLIC_VERCEL_URL
|
||||
: process.env.NEXT_PUBLIC_SITE_URL
|
||||
}?auth=true`,
|
||||
},
|
||||
})
|
||||
if (error) throw error
|
||||
|
||||
@@ -61,7 +61,11 @@ const UnauthorizedLanding = () => {
|
||||
auth.signInWithOAuth({
|
||||
provider: 'github',
|
||||
options: {
|
||||
redirectTo: `${process.env.NEXT_PUBLIC_SITE_URL}?${params.toString()}`,
|
||||
redirectTo: `${
|
||||
process.env.NEXT_PUBLIC_VERCEL_ENV === 'preview'
|
||||
? process.env.NEXT_PUBLIC_VERCEL_URL
|
||||
: process.env.NEXT_PUBLIC_SITE_URL
|
||||
}?${params.toString()}`,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user