Test: Google oauth

This commit is contained in:
Kamigen
2024-04-20 23:11:20 -04:00
parent 4b1989587c
commit ec32a525a9
9 changed files with 68 additions and 27 deletions

View File

@@ -1,5 +1,9 @@
<template>
<v-app style="background-color: #f4f4f4;">
<!-- Google Oauth -->
<GoogleLogin :callback="googleCallback" popup-type="TOKEN">
<button>Login Using Google</button>
</GoogleLogin>
<div class="sm:flex hidden items-center justify-between flex-col"
style="background-color: #f4f4f4; margin-top: 3%;">
@@ -101,6 +105,7 @@ import {auth} from '@/stores/auth.js';
import {ref} from 'vue';
import {useRouter} from 'vue-router';
import {useClient} from "@/plugins/api.js";
import {decodeCredential} from 'vue3-google-login'
const api = useClient()
@@ -119,6 +124,10 @@ async function login() {
}
}
const googleCallback = (response) => {
console.log(response)
//store.loginWithGoogle(api, credential)
}
</script>
<style scoped>