debug: proper redirect
This commit is contained in:
@@ -20,10 +20,20 @@
|
|||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const params = new URLSearchParams(window.location.search);
|
||||||
|
console.log({ params });
|
||||||
|
const redirectTo = window.location.origin + params.get('redirectTo');
|
||||||
|
|
||||||
|
console.log({ redirectTo });
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log('signInWithGoogle');
|
console.log('signInWithGoogle');
|
||||||
const { error, data } = await supabase.auth.signInWithOAuth({
|
const { error, data } = await supabase.auth.signInWithOAuth({
|
||||||
provider: 'google'
|
provider: 'google',
|
||||||
|
options: {
|
||||||
|
redirectTo
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('data', data);
|
console.log('data', data);
|
||||||
|
|||||||
Reference in New Issue
Block a user