incognitolm commited on
Commit
405d05f
·
1 Parent(s): eebd3be

Google OAuth

Browse files
Files changed (1) hide show
  1. public/js/auth.js +2 -2
public/js/auth.js CHANGED
@@ -72,8 +72,8 @@ export async function signUpWithEmail(email, password) {
72
  }
73
 
74
  export async function loginWithOAuth(provider) {
75
- const redirectTo = encodeURIComponent(`${location.origin}/oauth-callback`);
76
- const url = `${SUPABASE_URL}/auth/v1/authorize?provider=${provider}&redirect_to=${redirectTo}`;
77
  window.open(url, '_blank', 'width=520,height=640,noopener');
78
  }
79
 
 
72
  }
73
 
74
  export async function loginWithOAuth(provider) {
75
+ const redirectTo = encodeURIComponent(`${location.origin}/oauth-callback.html`);
76
+ const url = `${SUPABASE_URL}/auth/v1/authorize?rd=https%3A%2F%2Fincognitolm-chat.hf.space%2Foauth-callback.html&provider=${provider}&redirect_to=${redirectTo}`;
77
  window.open(url, '_blank', 'width=520,height=640,noopener');
78
  }
79