Skip to content

Conversation

@Alex-4-Git
Copy link
Contributor

ID token requires the expire time to be relative to 1970. Right now we first generate the time that is relative to 2001 and then add the time interval between 2001 and 1970.

  • (NSString *)idTokenWithExpireTime:(NSTimeInterval)expireTime {
    return [OIDTokenResponse idTokenWithSub:kUserID exp:@(expireTime + NSTimeIntervalSince1970)];
    }

This PR is to simplify it by using 1970 as the reference date.

@Alex-4-Git Alex-4-Git merged commit 89b3ed8 into GIDGoogleUser-restructure Sep 22, 2022
@Alex-4-Git Alex-4-Git deleted the pin-improveIDTokenExpireTimeReadability branch September 22, 2022 18: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.

3 participants