-
Notifications
You must be signed in to change notification settings - Fork 208
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
'expiresIn' in iOS has an incorrect value #685
Comments
I'm seeing something similar. After a normal authorise, I was seeing getCredentials return And then after calling getCredentials with force refresh I got So it seems the expiresIn value from the initial login was not correct? The authorise method uses the saveCredentials method -
This error leads to hasValidCredentials returning true when the accessToken returned has expired... |
@Widcket Can you check this one out? |
Hi @jess-hwang, thanks for raising this. I just reproduced this issue. Indeed, the The solution would be to use the Date(timeIntervalSince1970:) initializer instead. |
Hi @jess-hwang and @brushton-ces thanks for raising this. We have fixed this in the PR here - #686. Please test it and let us know. We will close this issue and the conversation can be continued there. |
Checklist
Description
"authorize" returns "expiresIn" in Unix timestamp format, but in iOS, when using "saveCredentials," the value is mistakenly assigned using "timeIntervalSinceNow," leading to incorrect values for "expiresIn."
I think it should be "timeIntervalSince1970."
"expiresIn" contains strange dates like "2077-03-03 22:24:35 +0000."
Reproduction
I tested it in version 3.0.0-beta.3.
Additional context
No response
react-native-auth0 version
3.0.0-beta.3
React Native version
0.68.2
Expo version
No response
Platform
iOS
Platform version(s)
16.4
The text was updated successfully, but these errors were encountered: