stevdza-san / OneTapCompose

This library allow you to easily integrate One-Tap Sign in with Google(Credential Manager) in your project with Jetpack Compose. It keeps away all the boilerplate code.
Apache License 2.0
171 stars 15 forks source link

"Google Account not Found" when you dismiss multiple times the modal #19

Closed AlessandroVendraminiDeveloper closed 5 months ago

AlessandroVendraminiDeveloper commented 5 months ago

Hi, I encountered a problem when I dismiss the account selection modal more than once. It would seem that if you click outside the modal or on the X more than 3/4 times, Android blocks you and shows you the Google account not found dialog. Clearing the cache doesn't work, and neither does deleting the app and reinstalling it.

stevdza-san commented 5 months ago

"If you encounter this 24-hour cooldown period during development, you can reset the cooldown by clearing Google Play services' app storage. Alternatively, to toggle on/off this cooldown on a test device and/or emulator alike, simply go to the Dialer app and input the following code: ##66382723##. Upon submission, there will be no feedback, but your dialer will clear all input and may close. The cooldown should be toggled off after this. To toggle it back on, input the same code again."

Check more information on this link: https://developers.google.com/identity/one-tap/android/get-saved-credentials#disable-one-tap

AlessandroVendraminiDeveloper commented 5 months ago

@stevdza-san Is it possible to cast this specific case in the OneTapSignInWithGoogle composable such as onDialogDismissed?

stevdza-san commented 5 months ago

@AlessandroVendraminiDeveloper That's a good suggestion, however, underneath, the One-Tap API does trigger a cancel state, when that happens. Which is the same as when a user manually cancels the dialog. It's hard to distinguish. I will think of implementing Credential Manager to replace One-Tap API, since they're gonna deprecate it eventually. I hope that Credential Manager will not have that cool-down like this API has. :)

AlessandroVendraminiDeveloper commented 5 months ago

Ok thanks a lot! :)

stevdza-san commented 5 months ago

@AlessandroVendraminiDeveloper I've just pushed a new release "1.0.11". Now you should be able to receive a custom error message when your sign in call has been blocked.