-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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(auth, android): do not timezone offset when getting UTC timestamp #4886
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/invertase/react-native-firebase/8k849l3a4 |
Codecov Report
@@ Coverage Diff @@
## master #4886 +/- ##
=======================================
Coverage 89.06% 89.06%
=======================================
Files 109 109
Lines 3720 3720
Branches 347 347
=======================================
Hits 3313 3313
Misses 365 365
Partials 42 42 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there! Thanks for this, I think you are on to something but we need to be careful with shared APIs
I left a comment related to the other consumers of the shared API you modified - can you have a look at it and tell me what you think?
packages/app/android/src/reactnative/java/io/invertase/firebase/common/SharedUtils.java
Show resolved
Hide resolved
…invertase#4886) * Add test for expirationTime of tokenResult * Fix android timestampToUTC util * Use single quote
…invertase#4886) * Add test for expirationTime of tokenResult * Fix android timestampToUTC util * Use single quote
Description
In Android, JWT's iat and exp are now converted to correctly UTC time in strings.
Unnecessary offsets were being added to the timestamps, causing them to be converted to the wrong UTC time in strings.
Related issues
Release Summary
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
I have tested the following:
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter