Test: Google oauth
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user