Skip to content

Commit e40b81b

Browse files
committed
Merge branch 'develop'
2 parents bae6438 + d4dedc7 commit e40b81b

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed
-214 KB
Binary file not shown.

OAuth.io.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
#
1717

1818
s.name = "OAuth.io"
19-
s.version = "1.2.0"
19+
s.version = "1.2.1"
2020
s.summary = "OAuth that just works!"
2121

2222
s.description = <<-DESC
@@ -71,7 +71,7 @@ Pod::Spec.new do |s|
7171
# Supports git, hg, bzr, svn and HTTP.
7272
#
7373

74-
s.source = { :git => "https://github.com/oauth-io/oauth-ios.git", :tag => "1.2.0" }
74+
s.source = { :git => "https://github.com/oauth-io/oauth-ios.git", :tag => "1.2.1" }
7575

7676

7777
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

OAuthiOS.xcodeproj/xcuserdata/antoine.xcuserdatad/xcschemes/xcschememanagement.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<key>OAuthiOS.xcscheme</key>
1313
<dict>
1414
<key>orderHint</key>
15-
<integer>0</integer>
15+
<integer>1</integer>
1616
</dict>
1717
</dict>
1818
<key>SuppressBuildableAutocreation</key>

OAuthiOS/Src/OAuthIOModal.m

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,17 @@ - (void)showWithProvider:(NSString *)provider options:(NSDictionary*)options
351351
NSDictionary *json_d = [NSJSONSerialization JSONObjectWithData:[json dataUsingEncoding:NSUTF8StringEncoding] options: NSJSONReadingMutableContainers error:nil];
352352
NSNumber *expires = [[json_d objectForKey:@"data"] objectForKey:@"expires"];
353353
NSTimeInterval interval = [expires doubleValue];
354-
NSDate *expiring_date = [[NSDate alloc] initWithTimeIntervalSince1970:interval];
355354
NSDate *now = [[NSDate alloc] init];
355+
NSDate *expiring_date;
356+
357+
if (expires != nil) {
358+
expiring_date = [[NSDate alloc] initWithTimeIntervalSince1970:interval];
359+
} else {
360+
// If no expiry date is available, defaults to one hour
361+
interval = 3600;
362+
expiring_date = [[NSDate alloc] initWithTimeIntervalSinceNow:interval];
363+
}
364+
356365
if ([now compare:expiring_date] == NSOrderedAscending)
357366
{
358367
@try {

0 commit comments

Comments
 (0)