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
To Reproduce
There appears to be two requirements to reproduce this:
restorePreviousSignIn() must be invoked multiple times before the first call completes
the tokens must be close enough to expiring to trigger refresh logic
Specific repro steps:
Make local changes to DaysUntilBirthday sample app such that restorePreviousSignIn() is invoked twice - see: 01d8cb3
Sign in
Kill and restart the app. Check console: should see output below, indicating that both completion blocks are invoked:
0: Restoring
1: Restoring
0: Done: Optional(<GIDGoogleUser: 0x600002124820>), nil
1: Done: Optional(<GIDGoogleUser: 0x600002124820>), nil
Kill the app and wait for about an hour. I was also able to reproduce immediately by changing kMinimalTimeToExpire and kMinimumRestoredAccessTokenTimeToExpire to both be 60.0*59.9.
Restart the app and check console output.
Expected behavior
console output should be the following, indicating that both completion blocks were invoked:
0: Restoring
1: Restoring
0: Done: Optional(<GIDGoogleUser: 0x600002124820>), nil
1: Done: Optional(<GIDGoogleUser: 0x600002124820>), nil
Actual behavior
console output is the following, indicating the first completion block was not invoked:
0: Restoring
1: Restoring
1: Done: Optional(<GIDGoogleUser: 0x600002124820>), nil
The text was updated successfully, but these errors were encountered:
Describe the bug
GIDSignIn.sharedInstance.restorePreviousSignIn() does not always invoke the completion handler.
I suspect these two closed issues may have the same root cause:
GIDSignIn.sharedInstance.signIn
does not return a callback sometimes #378To Reproduce
There appears to be two requirements to reproduce this:
Specific repro steps:
01d8cb3
0: Restoring
1: Restoring
0: Done: Optional(<GIDGoogleUser: 0x600002124820>), nil
1: Done: Optional(<GIDGoogleUser: 0x600002124820>), nil
Expected behavior
console output should be the following, indicating that both completion blocks were invoked:
0: Restoring
1: Restoring
0: Done: Optional(<GIDGoogleUser: 0x600002124820>), nil
1: Done: Optional(<GIDGoogleUser: 0x600002124820>), nil
Actual behavior
console output is the following, indicating the first completion block was not invoked:
0: Restoring
1: Restoring
1: Done: Optional(<GIDGoogleUser: 0x600002124820>), nil
The text was updated successfully, but these errors were encountered: