Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix expiresIn in iOS has an incorrect value #686

Merged
merged 2 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
PODS:
- A0Auth0 (3.0.0-beta.2):
- Auth0 (= 2.4.0)
- A0Auth0 (3.0.0-beta.3):
- Auth0 (= 2.5.0)
- JWTDecode (= 3.1.0)
- React-Core
- SimpleKeychain (= 1.1.0)
- Auth0 (2.4.0):
- Auth0 (2.5.0):
- JWTDecode (~> 3.1)
- SimpleKeychain (~> 1.1)
- boost (1.76.0)
Expand Down Expand Up @@ -584,8 +584,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
A0Auth0: 34a88d6ea01d78133e7d228384d07b840162c7ea
Auth0: 7c454e679f19d160f1f32bf1e9fa095db19f8769
A0Auth0: 9b09cdadf55316a7169a046ad4acaa73f0060cfa
Auth0: 72f19ad566fdf57f07bf37f828afd0c1570769a5
boost: 57d2868c099736d80fcd648bf211b4431e51a558
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
Expand Down Expand Up @@ -640,4 +640,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 78e8dab006d0d9a82e41a924fda07d925d4623c7

COCOAPODS: 1.11.2
COCOAPODS: 1.12.1
4 changes: 2 additions & 2 deletions ios/NativeBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ public class NativeBridge: NSObject {
let scope = credentialsDict[NativeBridge.scopeKey] as? String
var expiresIn: Date?
if let string = credentialsDict[NativeBridge.expiresInKey] as? String, let double = Double(string) {
expiresIn = Date(timeIntervalSinceNow: double)
expiresIn = Date(timeIntervalSince1970: double)
} else if let double = credentialsDict[NativeBridge.expiresInKey] as? Double {
expiresIn = Date(timeIntervalSinceNow: double)
expiresIn = Date(timeIntervalSince1970: double)
} else if let dateStr = credentialsDict[NativeBridge.expiresInKey] as? String {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = NativeBridge.dateFormat
Expand Down