-
Notifications
You must be signed in to change notification settings - Fork 140
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
Credentials are not refreshed properly #695
Comments
Hi @nt I am wondering whether you are mentioning the issue because of this
Can you elaborate whether it is only If not, can you check the fix we have provided here - auth0/auth0-flutter#286 About how we compare time in the library: If you see here, you can see that the API provided time is deserialized as time specific to the device's timezone. So it shouldn't be an issue to compare it with the system's local time. Also in the interest of keeping the conversation in one place, it is related to our Flutter SDK and also there is an issue discussing around the same thing, can we continue the conversation in this thread? |
The issue is not with your Date or DateTime objects, it is with your conversion to seconds. https://github.com/auth0/Auth0.Android/blob/main/auth0/src/main/java/com/auth0/android/authentication/storage/SecureCredentialsManager.kt#L178 Unfortunately, my system is not set up to debug java / kt and I lack the time to build a test case for you. |
@nt would love to discuss more on this and get to the bottom of it so that I can debug the SDK if there is an issue. According to the getTime documentation
So if we are converting the API provided time (UTC) to system specific time and then doing the comparison in milliseconds since Jan 1 1970 00:00:00 GMT |
Checklist
Description
The library compares:
This leads to not refreshing expired credentials in timezones behind UTC.
Reproduction
The issue should be clear from reading the code links I provided above.
Additional context
I am using this lib through auth0_flutter. I have not checked if the iOS impl is correct.
Auth0.Android version
auth0_flutter: ^1.2.1
Android version(s)
13
The text was updated successfully, but these errors were encountered: