react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

feat(auth): Add Expo support for phone auth

Open nandorojo opened this issue 2 years ago • 20 comments

  • Add @react-native-firebase/auth config plugin, which enables captcha for phone auth by modifying Info.Plist.
  • Add docs to the Phone Auth page for Expo users.

Sorry for some reason the checklist didn't show up here when I created the PR. I'll try to find it.

Related: #5936

nandorojo avatar Mar 30 '22 17:03 nandorojo

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

react-native-firebase-next – ./website_modular

🔍 Inspect: https://vercel.com/invertase/react-native-firebase-next/GdRYosTApz198bxUW4NMMPM6EnmP
✅ Preview: Canceled

[Deployment for f0d9719 canceled]

react-native-firebase – ./

🔍 Inspect: https://vercel.com/invertase/react-native-firebase/2io74G4TrvVRNdUHGNLtBg1kdHe3
✅ Preview: https://react-native-firebase-git-fork-nandorojo-main-invertase.vercel.app

vercel[bot] avatar Mar 30 '22 17:03 vercel[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Mar 30 '22 17:03 CLAassistant

@nandorojo this appears to be close, but with some nice + detailed comments still needing handling that should get it to the finish line. I marked it as waiting for response

mikehardy avatar Apr 19 '22 22:04 mikehardy

Codecov Report

Merging #6167 (e91078f) into main (254f9fc) will decrease coverage by 17.82%. The diff coverage is n/a.

:exclamation: Current head e91078f differs from pull request most recent head ee33edf. Consider uploading reports for the commit ee33edf to get more accurate results

@@              Coverage Diff              @@
##               main    #6167       +/-   ##
=============================================
- Coverage     72.31%   54.50%   -17.81%     
- Complexity        0      679      +679     
=============================================
  Files           109      208       +99     
  Lines          4655    10356     +5701     
  Branches       1048     1645      +597     
=============================================
+ Hits           3366     5643     +2277     
- Misses         1211     4432     +3221     
- Partials         78      281      +203     

codecov[bot] avatar Apr 19 '22 22:04 codecov[bot]

@barthap thanks for your comments here! I'll try to address them shortly. Would be great if you could add the aforementioned unit test too.

nandorojo avatar Apr 20 '22 14:04 nandorojo

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
react-native-firebase ❌ Failed (Inspect) Jul 18, 2022 at 7:09PM (UTC)
1 Ignored Deployment
Name Status Preview Updated
react-native-firebase-next ⬜️ Ignored (Inspect) Jul 18, 2022 at 7:09PM (UTC)

vercel[bot] avatar Apr 20 '22 14:04 vercel[bot]

Are there any updates on this pull request?

justin-chau avatar May 12 '22 23:05 justin-chau

None that I've seen, I don't think there is any harm in taking the changes on the fork and proposing a PR based on it if this is functionality you need

mikehardy avatar May 13 '22 01:05 mikehardy

Sorry I’ve been too busy to get to this. @justin-chau you’re welcome to apply the suggested edits as commits to my PR and I can accept them

nandorojo avatar May 13 '22 02:05 nandorojo

Is the only thing missing at the moment the unit tests?

justin-chau avatar May 14 '22 05:05 justin-chau

My review comments are still unaddressed, especially the one about missing package.json scripts and missing app.plugin.js file.

barthap avatar May 14 '22 05:05 barthap

I addressed all the feedback. @barthap let me know if this is good to go.

nandorojo avatar May 23 '22 15:05 nandorojo

Just need to run yarn to resolve the lock file conflict and this will be good to go. I’ll do it when I’m at my computer.

nandorojo avatar Jul 02 '22 14:07 nandorojo

Any updates on this? Would love to get this merged.

izakfilmalter avatar Jul 18 '22 18:07 izakfilmalter

I rebased + re-pushed this - I need to re-scan it prior to merge but last time I did (quite a time ago!) it seemed fine

Unfortunately in the time between proposal and now firebase-ios-sdk v9 was adopted (in react-native-firebase v15) which requires use_frameworks, and I just mention that because I know that this transition is still in process in a lot of ways and is difficult to adopt. The related issues here are still open with users helping each other figure out exactly how best to get it working for Expo, if I understand correctly - and even in non-Expo case you have to disable Flipper + Hermes for it to work on iOS

mikehardy avatar Jul 18 '22 19:07 mikehardy

:thinking: Hmm some sort of entropy appears to have taken over, I probably will not have time to fix this for a while (weeks perhaps) as I'm traveling at the moment

Run node -e "require('./website/scripts/generate-typedoc').generateTypedoc()"
/home/runner/work/react-native-firebase/react-native-firebase/tsconfig.json
Using TypeScript 3.9.10 from /home/runner/work/react-native-firebase/react-native-firebase/website/node_modules/typescript/lib
Error: /home/runner/work/react-native-firebase/react-native-firebase/node_modules/@types/jest/index.d.ts([4](https://github.com/invertase/react-native-firebase/runs/7396232937?check_suite_focus=true#step:9:5)1[5](https://github.com/invertase/react-native-firebase/runs/7396232937?check_suite_focus=true#step:9:6))
 ']' expected.
Error: /home/runner/work/react-native-firebase/react-native-firebase/node_modules/@types/jest/index.d.ts(415)
 ';' expected.
Error: /home/runner/work/react-native-firebase/react-native-firebase/node_modules/@types/jest/index.d.ts(415)
 ';' expected.
Error: /home/runner/work/react-native-firebase/react-native-firebase/node_modules/@types/jest/index.d.ts(415)
 ';' expected.
Error: /home/runner/work/react-native-firebase/react-native-firebase/node_modules/@types/jest/index.d.ts(415)
 Declaration or statement expected.
Error: /home/runner/work/react-native-firebase/react-native-firebase/node_modules/@types/jest/index.d.ts(419)
 ']' expected.
Error: /home/runner/work/react-native-firebase/react-native-firebase/node_modules/@types/jest/index.d.ts(419)
 ';' expected.
Error: /home/runner/work/react-native-firebase/react-native-firebase/node_modules/@types/jest/index.d.ts(419)
 ';' expected.
Error: /home/runner/work/react-native-firebase/react-native-firebase/node_modules/@types/jest/index.d.ts(419)
 ';' expected.
Error: /home/runner/work/react-native-firebase/react-native-firebase/node_modules/@types/jest/index.d.ts(419)
 Declaration or statement expected.
Error: /home/runner/work/react-native-firebase/react-native-firebase/node_modules/@types/jest/index.d.ts(419)
 Declaration or statement expected.
Error: /home/runner/work/react-native-firebase/react-native-firebase/node_modules/@types/jest/index.d.ts(13[8](https://github.com/invertase/react-native-firebase/runs/7396232937?check_suite_focus=true#step:9:9)4)
 Declaration or statement expected.
node:internal/fs/utils:345
    throw err;
    ^

I welcome any efforts here

mikehardy avatar Jul 18 '22 19:07 mikehardy

Does that only happen on this branch? What script causes that to happen?

nandorojo avatar Jul 18 '22 19:07 nandorojo

Does that only happen on this branch? What script causes that to happen?

It's in CI, so you can see all related dependencies + commands run by looking at the related github workflows and github actions log of the run

It appears to be only this branch, but I just rebased it against main (which is working) and I don't know why this branch would cause the problem - I have not investigated at all. I will re-run the action in case it was just some transient flaky failure

mikehardy avatar Jul 18 '22 19:07 mikehardy

Vercel deployment failed for the same reason. Seems strange, I don't know sorry :shrug: - I'm about to be away from keyboard and will likely not have time to inspect for weeks, I'm not sure. Worst case, could effectively create a new branch from main then re-apply the changes since they are probably self-contained ? To make sure it's "clean"

mikehardy avatar Jul 18 '22 19:07 mikehardy

I rebased and pushed using the latest main, my PR is #6472 Please review it and merge it if it makes more sense

pduggi-cf avatar Aug 16 '22 07:08 pduggi-cf

Superceded by #6645

mikehardy avatar Oct 30 '22 16:10 mikehardy