wavezync / vue3-google-signin

Google OAuth2 plugin for Vue3 Apps. This uses latest Google Identity Service Library. It also provides set of composables which can be used easily to implement different authentication strategies
https://vue3-google-signin.wavezync.com/
MIT License
161 stars 17 forks source link

One Tap still showing after login success #58

Open geofany opened 10 months ago

geofany commented 10 months ago

Describe the bug hello i using one tap. but after i success login. The One Tap is still showing. how to disabled it when user already logged in ?

kasvith commented 10 months ago

Hi @geofany would you provide us a stackblitz or codesandox?

Pausejo commented 3 weeks ago

This can ve achieved with a cookie, but I don't see that option in the composable

https://developers.google.com/identity/gsi/web/guides/toggle-display-with-cookies

Any roadmap on include this?

kasvith commented 3 weeks ago

im not sure JS API supports the cookie option

Kasun Vithanage

On Tue, Oct 8, 2024 at 3:24 PM Pablo Ausejo @.***> wrote:

This can ve achieved with a cookie, but I don't see that option in the composable

https://developers.google.com/identity/gsi/web/guides/toggle-display-with-cookies

Any roadmap on include this?

— Reply to this email directly, view it on GitHub https://github.com/wavezync/vue3-google-signin/issues/58#issuecomment-2399393614, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGCQC7KAFBGB6DFHOTXCITZ2OTTTAVCNFSM6AAAAABPRZXXLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJZGM4TGNRRGQ . You are receiving this because you commented.Message ID: @.***>

Pausejo commented 3 weeks ago

Ok, so then it's possible to achieve the same result this way:

const { isReady, login } = useOneTap({ ... })

watch(isReady, (isReady) => { if (!isReady) return if (document.cookie.includes('my-cookie')) return

login() })

kasvith commented 3 weeks ago

Yep sounds about right

Kasun Vithanage

On Tue, Oct 8, 2024 at 4:39 PM Pablo Ausejo @.***> wrote:

Ok, so then it's possible to achieve the same result this way:

const { isReady, login } = useOneTap({ ... })

watch(isReady, (isReady) => { if (!isReady) return if (document.cookie.includes('my-cookie')) return

login() })

— Reply to this email directly, view it on GitHub https://github.com/wavezync/vue3-google-signin/issues/58#issuecomment-2399547845, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGCQCZRZSMO447WJHLBPI3Z2O4M7AVCNFSM6AAAAABPRZXXLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJZGU2DOOBUGU . You are receiving this because you commented.Message ID: @.***>