Skip to content

Commit 13ee0fb

Browse files
Fixed a crash when 'expires_in' was null on the JSON response
1 parent aedc67a commit 13ee0fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/OAuth2Client/NXOAuth2AccessToken.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ + (id)tokenWithResponseBody:(NSString *)theResponseBody tokenType:(NSString *)to
6767
}
6868

6969
NSDate *expiryDate = nil;
70-
if (expiresIn) {
70+
if (expiresIn != nil && expiresIn != [NSNull null]) {
7171
expiryDate = [NSDate dateWithTimeIntervalSinceNow:[expiresIn integerValue]];
7272
}
7373
return [[[self class] alloc] initWithAccessToken:anAccessToken

0 commit comments

Comments
 (0)