Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One Tap still showing after login success #58

Open
geofany opened this issue Dec 27, 2023 · 5 comments
Open

One Tap still showing after login success #58

geofany opened this issue Dec 27, 2023 · 5 comments

Comments

@geofany
Copy link

geofany commented Dec 27, 2023

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
Copy link
Collaborator

kasvith commented Dec 27, 2023

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

@Pausejo
Copy link

Pausejo commented Oct 8, 2024

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
Copy link
Collaborator

kasvith commented Oct 8, 2024 via email

@Pausejo
Copy link

Pausejo commented Oct 8, 2024

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
Copy link
Collaborator

kasvith commented Oct 8, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants