Closed francelwebdev closed 1 year ago
Yes it will work with Nuxt3, Initialize vue3-google-login inside the plugins directory. For example, create a file named vue3-google-login.client.ts and place it inside the plugins directory.
:exclamation: Make sure to use
.client
suffix in the file name to load the plugin only on the client side.import vue3GoogleLogin from 'vue3-google-login'
export default defineNuxtPlugin((nuxtApp) => { nuxtApp.vueApp.use(vue3GoogleLogin, { clientId: 'YOUR_GOOGLE_CLIENT_ID' }) });
> :exclamation: While using [GoogleLogin component](#googlelogin-component), make sure it is wrapped inside [`<ClientOnly>`](https://nuxt.com/docs/api/components/client-only) component.
```vue
<ClientOnly>
<GoogleLogin :callback="callback" />
</ClientOnly>
Hi, I'm currently using nuxt 3 and wanted to know if vue- google-login works with Nuxt 3.