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
176 stars 15 forks source link

Switching user accounts? #11

Closed Micoder-dev closed 7 months ago

Micoder-dev commented 7 months ago

Once I logged in with an account it didn't show any other email lists, if I have 2 email IDs on my mobile initially it shows to select which account but after logging in with one email it always logins only with that email forever even reinstalling the app

stevdza-san commented 7 months ago

Hey @Micoder-dev I'm aware of that issue, and I'll work on it in the following days to push a new release. :) Will close this issue after I'm done.

stevdza-san commented 7 months ago

There's a new parameter in the OneTapSignInWithGoogle that I've added, "rememberAccount" that you can set to false if you wish to be able to select more then one account. Update to the newest version of v1.0.9.

Micoder-dev commented 7 months ago

There's a new parameter in the OneTapSignInWithGoogle that I've added, "rememberAccount" that you can set to false if you wish to be able to select more then one account. Update to the newest version of v1.0.9.

It seems there's a new parameter, "rememberAccount," that you've added to the "OneTapSignInWithGoogle" function. If you set "rememberAccount" to false, users can choose from multiple Google accounts. However, there's an issue when you've logged into more than one account. Even when "rememberAccount" is set to true, it doesn't automatically log in to the last signed-in account. Instead, it keeps displaying all the previously logged-in accounts every time the app opens.

For instance, let's say you have three Google accounts, and you've previously logged into two of them. Even with "rememberAccount" set to true, it still shows those two accounts for you to select from, making it less convenient.

It seems like you want this issue to be addressed and resolved in a more user-friendly and understandable way.

stevdza-san commented 7 months ago

Unfortunately I don't think One-Tap Sign in API, does have a feature for that scenario. You will be able to use auto select feature only when there's one account previously selected.

For users who opt-in, Auto Select allows a credential to be selected automatically without waiting for a user action (such as tapping on the "continue" button). A credential can be auto selected if 1) only one credential can be used for sign-in; and 2) no further actions need to be taken for this credential (for example, data sharing permissions are already collected for a Google account).