We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6bce880 commit 3bf57cdCopy full SHA for 3bf57cd
src/lib/supabase.ts
@@ -22,10 +22,15 @@ export interface LeaderboardEntry {
22
23
// Auth helper functions
24
export const signInWithGoogle = async () => {
25
+ // Use Vercel URL in production, localhost in development
26
+ const redirectUrl = window.location.hostname === 'localhost'
27
+ ? 'http://localhost:8080/#/quiz'
28
+ : 'https://bb84-simulation.vercel.app/#/quiz';
29
+
30
const { data, error } = await supabase.auth.signInWithOAuth({
31
provider: 'google',
32
options: {
- redirectTo: `${window.location.origin}/#/quiz`,
33
+ redirectTo: redirectUrl,
34
},
35
});
36
return { data, error };
0 commit comments