Skip to content

Conversation

@Alex-4-Git
Copy link
Contributor

OIDTokenResponse requires a time interval to indicate the life time of the access token such as 3600.

In the current unit tests we first set the expiration time using
NSTimeInterval accessTokenExpireTime = [[NSDate date] timeIntervalSince1970] + accessExpireIn;
Then when we need the time interval we do
NSNumber *accessTokenExpiresIn = @(accessTokenExpireTime - [[NSDate date] timeIntervalSince1970]);

This PR is to simplify this by directly set the life time of accessToken accessTokenExpiresIn.

Alex-4-Git and others added 9 commits September 19, 2022 17:55
Send KVO notifications when authState updates tokens.
Uses bit mask to verify KVO notifications are sent.
Since we use NSObject automatic change notifications we can remove the tests for manual notifications emission.
Added a new test case `testUpdateAuthStateWithUnchangedRefreshTokenAndIDToken `
@Alex-4-Git Alex-4-Git force-pushed the pin-ImproveAccessTokenExpireTime branch from 0c6682a to 6ec86da Compare September 26, 2022 16:28
Use expiresIn on both access toke and id token.
@Alex-4-Git Alex-4-Git merged commit 2c833ce into GIDGoogleUser-restructure Sep 26, 2022
@Alex-4-Git Alex-4-Git deleted the pin-ImproveAccessTokenExpireTime branch September 26, 2022 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants