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
googleApi: determine Logged In without going through Login process when user is not Logged In #25
Comments
if the app terminates, then the UI is getting presented. so, it seems it's only cached while the app is running in the foreground and background, but once the app is closed, then it will present the UI again for the user to choose the google account to login with. so, this is a 2nd problem. so, for the first problem, we store on the device's user prefs that the user has a google account used before. but, for the the 2nd issue stated in this comment, how do i cache the tokens and check for valid without going to the UI again for the user to choose their account again? this is the experience i am seeing when using googleApi.authenticate() |
I cannot duplicate this. Using the sample, on iOS and Android if I log into an account. next time I press login the UI is not shown. What platform are you trying this on? iOS Simulator has had a bug for years, if you don't specify entitlements it will not let you securely save tokens. So this could happen on the iOS Simulator. |
Using it on an android emulator and android device gives me the same
results that I described when closing the app and closing it from running
in the background. You are closing its task too?
…On Tue, Sep 25, 2018, 12:13 PM James Clancey ***@***.***> wrote:
I cannot duplicate this. Using the sample, on iOS and Android if I log
into an account. next time I press login the UI is not shown. What platform
are you trying this on? iOS Simulator has had a bug for years, if you don't
specify entitlements it will not let you securely save tokens. So this
could happen on the iOS Simulator.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#25 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGZWSRSeUVIEayRAACXMfNFJZLhd1B3Fks5uemRKgaJpZM4W2xcQ>
.
|
I have been debugging. Starting and stoping the debugger. That kills the processes |
If you look at the authenticate code, it loads the cached account. If it is still valid, it returns and never presents the UI: https://github.com/Clancey/simple_auth/blob/master/simple_auth/lib/src/oauth/oauthApi.dart#L60-L72 |
I would recommend cloning the source, putting some breakpoints in there and see what happens for you. |
Sounds good James, I'll do just that and report back.
…On Tue, Sep 25, 2018, 12:39 PM James Clancey ***@***.***> wrote:
I would recommend cloning the source, putting some breakpoints in there
and see what happens for you.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#25 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGZWSQHjaveiJuNKBPNuhZvNgqX7Otdjks5uempKgaJpZM4W2xcQ>
.
|
@Clancey you're right about that example performing as i'm looking for. i don't know what i'm doing wrong. |
What provider are you using? A custom one? If so, it is most likely not setting the RefreshToken or the Expiration on the account. |
sorry, i don't understand to answer that. but, i did want to report back in case someone encounters this problem as well. for me, it was a scope issue of where this instance was declared: |
the problem about the above is that before the initial "Login" @Clancey said to do (24),, how can i check if the user has Logged in (without sending the user to go Login)? i only want to send the user to the Login page to Login if they are not Logged in. thanks!
The text was updated successfully, but these errors were encountered: