Skip to content

Commit cbe092b

Browse files
committed
Force OAuth to always redirect to Vercel production URL
1 parent 775b46a commit cbe092b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib/supabase.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ export interface LeaderboardEntry {
2828

2929
// Auth helper functions
3030
export const signInWithGoogle = async () => {
31-
// Use current origin to work on any device/domain
31+
// Always redirect to Vercel production URL
3232
const { data, error } = await supabase.auth.signInWithOAuth({
3333
provider: 'google',
3434
options: {
35-
redirectTo: `${window.location.origin}${window.location.pathname}#/quiz`,
35+
redirectTo: 'https://bb84-simulation.vercel.app/#/quiz',
3636
},
3737
});
3838
return { data, error };
@@ -47,7 +47,7 @@ export const signUpWithEmail = async (email: string, password: string, username:
4747
username,
4848
display_name: username,
4949
},
50-
emailRedirectTo: `${window.location.origin}${window.location.pathname}#/quiz`,
50+
emailRedirectTo: 'https://bb84-simulation.vercel.app/#/quiz',
5151
},
5252
});
5353
return { data, error };

0 commit comments

Comments
 (0)