diff --git a/pages/signin.vue b/pages/signin.vue index 19c4783..091f895 100644 --- a/pages/signin.vue +++ b/pages/signin.vue @@ -9,6 +9,7 @@ const password = ref('') const handleStandardSignin = async () => { + console.log(`handleStandardSignin email.value:${email.value}, password.value:${password.value}`); try { loading.value = true const { error } = await supabase.auth.signInWithPassword({ email: email.value, password: password.value }) @@ -20,6 +21,20 @@ } } + const handleGoogleSignin = async () => { + console.log('handleGoogleSignin'); + try { + loading.value = true + const { error } = await supabase.auth.signInWithOAuth({ provider: 'google' }) + if (error) throw error + } catch (error) { + alert(error) + } finally { + loading.value = false + } + } + + watchEffect(async () => { if (user.value) { await accountStore.init(); @@ -46,7 +61,7 @@ class="w-full py-2 text-white bg-indigo-600 rounded-md hover:bg-indigo-700">Sign in

or

-