Closed leoboom-isme closed 4 weeks ago
Can't seem to get this library to work.
My code:
<script setup> import { ref } from "vue"; import Button from "@/components/ui/Button.vue"; import { googleAuthCodeLogin } from "vue3-google-login" const googleClientId = ref(<client id text>); const googleLogin = () => { googleAuthCodeLogin({clientId: googleClientId}).then((response) => { console.log("Handle the response", response) }) } </script> <template> <div> <p class="tw-text-light tw-text-center">Or sign in with</p> <div class="tw-mt-5 tw-grid tw-grid-cols-2 tw-gap-4"> <Button @click="googleLogin" > <span>Google</span> </Button> </div> </div> </template>
Vue: 3.4 vue3-google-login: 2.0.26
@leoboom-isme In this line googleAuthCodeLogin({clientId: googleClientId}).then((response) => { Change googleClientId to googleClientId.value.
googleAuthCodeLogin({clientId: googleClientId}).then((response) => {
Inside Githubissues.
Can't seem to get this library to work.
My code:
Vue: 3.4 vue3-google-login: 2.0.26