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
I've been getting reports of users being signed out when the app launches. This shouldn't happen.
From error logs and from code tracing, the sequence seems to be:
The app launches.
The appLaunchSetup(userSignedIn for the credentials (e.g., iOSGoogle) gets called.
That credentials method calls the GenericSignInDelegate method signInCompleted.
That call leads to a call to iOSBasics internal method completeSignInProcess
That method calls api.checkCreds
If it has been a while since the app was last launched the sign in credentials may have expired.
This leads to the api.checkCreds call to receive an unauthorized response from the server, and the user is then signed out.
While I do do a refresh credentials when the app starts, that's insufficient. At best there is a race condition between that credentials refresh and the above api.checkCreds.
The text was updated successfully, but these errors were encountered:
It seems like what is called for here is to get rid of the periodic credentials refresh that I've been doing, and only if we get an unauthorized response from our server, to then do a credentials refresh. IIRC this is what I was doing on Neebla v1. This is not a particularly simple fix.
I'm going to keep the periodic refresh also, but change it to not do the refresh when the app launches. The new iOSBasics credentials refresh in CredentialsRefresh will take care of the initial refresh for credential when the app launches. The other, periodic, refreshes will deal with other network requests-- which are done using a background URLSession and not amenable to the strategy used by CredentialsRefresh. I.e., we can't easily restart these requests on a failure due to stale credentials.
I've been getting reports of users being signed out when the app launches. This shouldn't happen.
From error logs and from code tracing, the sequence seems to be:
appLaunchSetup(userSignedIn
for the credentials (e.g.,iOSGoogle
) gets called.GenericSignInDelegate
methodsignInCompleted
.iOSBasics
internal methodcompleteSignInProcess
api.checkCreds
If it has been a while since the app was last launched the sign in credentials may have expired.
This leads to the
api.checkCreds
call to receive anunauthorized
response from the server, and the user is then signed out.While I do do a refresh credentials when the app starts, that's insufficient. At best there is a race condition between that credentials refresh and the above
api.checkCreds
.The text was updated successfully, but these errors were encountered: