Skip to content

Commit 3637920

Browse files
author
toto
committed
Merge pull request nxtbgthng#62 from gabrielrinaldi/13ee0fb6991ebfbbf9e2bbe0c34ebbe391bb6980
Fixed crash on token JSON
2 parents 183a40b + 13ee0fb commit 3637920

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Getting the sources is as easy as doing a:
3131
* Add `$(SRCROOT)/path/to/OAuth2Client` _Header Search Paths_, set as _recursive_
3232
* Add `-ObjC` to _Other Linker Flags_
3333
* `#import "NXOAuth2.h"`
34+
* add the Security.framework as a build dependency
3435

3536
#### Desktop Mac projects
3637

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)