You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 19, 2019. It is now read-only.
Hi,
I'm trying to implement a transparent sign in to existing logged in users on new devices via SmartLock and Google Sign in.
The suggested flow is:
User signing in to our app
SmartLock saves the credential via (Auth.CredentialsApi.save)
Install and launch the app on a new device with the same Google account
SmartLock requests for existing credentials via (Auth.CredentialsApi.request)
If credential found, preform a silent login via (Auth.GoogleSignInApi.silentSignIn)
Everything works great except for step 5, the silent login returns Status{statusCode=SIGN_IN_REQUIRED, resolution=null}
I made sure and neither Auth.GoogleSignInApi.signOut / Auth.GoogleSignInApi.revokeAccess access were called in between.
I tried as well to use the regular login method,Auth.GoogleSignInApi.getSignInIntent but in that case the user sees the popup to select an account (even though there is only a single account) so that doesn't work as well.
So my question is why does the SIGN_IN_REQUIRED status is returned and how to resolve it?
According to the silentSignIn docs I see no reason why it shouldn't work:
If your user has never previously signed in to your app on the current device, we can still try to sign them in, without displaying user interface, if they have signed in on a different device.
We attempt to sign users in if:
There is one and only one matching account on the device that has previously signed in to your application, and
the user previously granted all of the scopes your app is requesting for this sign in.
Last note, I even tried to do test it on the same device by just clearing the app data after successful sign in and even then i'm seeing the same results.
Let me know if you need me to provide any other information
Thank you!
The text was updated successfully, but these errors were encountered:
@idanakav thanks for the report. Can you show what you're using for your GoogleSignInOptions? Also what is your end goal of the sign in: do you want to get an ID Token? Email address? Something else?
GoogleSignInOptions options = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestIdToken(...) .requestEmail() .build();
The end of the goal is to get the ID Token, display name and email.
Display name and email get be retrieved from the credential without any issue but credential.getIdTokens is always empty.
@idanakav are you calling setAccountName on the GoogleSignInOptions with the email retrieved from the Credential? See buildGoogleApiClient in the sample.
Hi,
I'm trying to implement a transparent sign in to existing logged in users on new devices via SmartLock and Google Sign in.
The suggested flow is:
Everything works great except for step 5, the silent login returns
Status{statusCode=SIGN_IN_REQUIRED, resolution=null}
I made sure and neither Auth.GoogleSignInApi.signOut / Auth.GoogleSignInApi.revokeAccess access were called in between.
I tried as well to use the regular login method,Auth.GoogleSignInApi.getSignInIntent but in that case the user sees the popup to select an account (even though there is only a single account) so that doesn't work as well.
So my question is why does the SIGN_IN_REQUIRED status is returned and how to resolve it?
According to the silentSignIn docs I see no reason why it shouldn't work:
Last note, I even tried to do test it on the same device by just clearing the app data after successful sign in and even then i'm seeing the same results.
Let me know if you need me to provide any other information
Thank you!
The text was updated successfully, but these errors were encountered: