-
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
feat(auth): include phoneNumber from PhoneMultiFactorInfo #7565
feat(auth): include phoneNumber from PhoneMultiFactorInfo #7565
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I don't seem to be able to access the logs for this 😞 |
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.
This looks pretty good - I left a few comments in form of code suggestions which could be adopted and this could merge, or if you've got thoughts + counter-proposals I'm happy to hear them
in general though I like the idea of backwards-compatibility to avoid the break, and following the same null-check idiom in the iOS code
Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 15 days until this gets closed automatically |
Still very interested in getting this one in - just had a couple more things that were high priority slice into my queue in front of it - apologies |
rename enrollmentDate -> enrollmentTime on iOS to match Android/Web (ref: https://firebase.google.com/docs/reference/js/auth.multifactorinfo) ref: - https://github.com/invertase/react-native-firebase/blob/main/packages/auth/android/src/main/java/io/invertase/firebase/auth/ReactNativeFirebaseAuthModule.java#L2500 - https://github.com/invertase/react-native-firebase/blob/main/packages/auth/lib/index.d.ts#L483 BREAKING CHANGE: enrollmentDate renamed to enrollmentTime on iOS split from invertase#7565
rename `enrollmentDate` -> `enrollmentTime` on iOS to match Android/Web (ref: https://firebase.google.com/docs/reference/js/auth.multifactorinfo) keep `enrollmentDate` around on ios for backwards compatibility, mark as deprecated. ref: - https://github.com/invertase/react-native-firebase/blob/main/packages/auth/android/src/main/java/io/invertase/firebase/auth/ReactNativeFirebaseAuthModule.java#L2500 - https://github.com/invertase/react-native-firebase/blob/main/packages/auth/lib/index.d.ts#L483 split from invertase#7565
Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 15 days until this gets closed automatically |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7565 +/- ##
==========================================
+ Coverage 32.97% 33.36% +0.39%
==========================================
Files 252 252
Lines 12530 12533 +3
Branches 1954 1956 +2
==========================================
+ Hits 4131 4180 +49
+ Misses 8305 8264 -41
+ Partials 94 89 -5 |
…nrollmentTime` (#7653) rename `enrollmentDate` -> `enrollmentTime` on iOS to match Android/Web (ref: https://firebase.google.com/docs/reference/js/auth.multifactorinfo) keep `enrollmentDate` around on ios for backwards compatibility, mark as deprecated. ref: - https://github.com/invertase/react-native-firebase/blob/main/packages/auth/android/src/main/java/io/invertase/firebase/auth/ReactNativeFirebaseAuthModule.java#L2500 - https://github.com/invertase/react-native-firebase/blob/main/packages/auth/lib/index.d.ts#L483 split from #7565
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.
I think if you add the nil check on phone number, allow it to return null in the JS-level typing, and remove the enrollmentTime/Date change (which I just merged separately) this can go in? I think that would satisfy all the comments here
Again, thanks for the patience, we're moving a bit now...
326e070
to
993c696
Compare
Oh of course the patch set generation fails this time because of some new CI features 🤦 - need to fix that, then rebase and re-run it, will be a bit, sorry |
d6fbbe8
to
d3578b6
Compare
4e8a1ff
to
8792280
Compare
@yuvalhermelin-fijoya okay, fixed the patchset generation it will show up as an attachment here: https://github.com/invertase/react-native-firebase/actions/runs/9086347168?pr=7565 The auth one is the only one you are interested in, but the patchset contains all merged changes since last public release + this PR, so all of them are valid. I don't anticipate that any of the code here will change, the holdup now is test process |
I just fixed a major chunk of our test process issues with #7797 |
8792280
to
34f4379
Compare
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.
This is looking good now - on course to land tonight and release, last bit of testing (enabling MFA tests for iOS) I'm going to defer as it implies a big shift to how we work since it's an auth-emulator vs cloud-auth thing
still need to merge the test tweak from #7565 (comment) then this can go |
34f4379
to
5d87679
Compare
this is useful for indicating to users which phone number they have enrolled, and distinguishing between factors if there are multiple phone factors enrolled.
…n to match iOS WIP needs test
behavior should mirror what android native MFA does with this change
5d87679
to
3e397a4
Compare
Thanks guys! |
Description
Expose
phoneNumber
on the MFA hints to JS.MultiFactorInfo
has two sub-classes in the underlying SDK's - one for TOTP and one for Phone, where the Phone one additionally includes thephoneNumber
registered to the factor.Before login the
phoneNumber
is redacted, and after login it is unredacted.This is useful for showing the user a hint as to which phone number they should check, or distinguishing between multiple phone factors.
Additionally rename
enrollmentDate
->enrollmentTime
on iOS to match Android/Web (ref: https://firebase.google.com/docs/reference/js/auth.multifactorinfo)enrollmentDate
as deprecated on iOS?ref:
Release Summary
phoneNumber
onPhoneMultiFactorInfo
enrollmentDate
toenrollmentTime
on iOS to match Android/WebChecklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
Tested on Android emulator, observed:
phoneNumber
included in hint on the login challengephoneNumber
included in hint after login (eg: showing a manage mfa UI)NOT tested on iOS - ideally could do with some help here.
🔥