Phone number auth with Firebase
complete
Will Chen
Firebase recently announced their new auth through phone number (SMS) - https://firebase.googleblog.com/2017/05/firebase-phone-auth.html
The advantage of phone number auth is that users don't have to muck around with a password and they authenticate using a short 6-digit code they receive via SMS for the first time and then they're automatically signed in for all future sessions.
Mouhamed aly SIDIBE
Checkout my article if you want to use Firebase phone auth in your app : https://mouhamedaly.dev/Authentification-par-num%C3%A9ro-de-t%C3%A9l%C3%A9phone-avec-Expo-et-Firebase.
Adriaan Balt
This doesn't work. See this forum thread for more info: https://forums.expo.io/t/firebase-phone-auth-recaptcha-error-invalid-format/37367
Brent Vatne
complete
you can use the expo-firebase-recaptcha library for this now! https://docs.expo.io/versions/latest/sdk/firebase-recaptcha/
Ilgım
Brent Vatne: Great job, yuppi 🙌
Raouf Madani
Brent Vatne: but it still doesn't work. undefined is not an object (evaluating firebase.auth.PhoneAuthProvider). I am importing firebase from @firebase/app and I am also importing @firebase/auth. I'm so frustated
Brent Vatne
Raouf Madani: be sure to follow this guide https://docs.expo.io/versions/latest/sdk/firebase-recaptcha/
Raouf Madani
Brent Vatne: Yes I've fixed it in April. Imaging what I want to do now!!! I wanna get rid of recaptcha, at least make it invisible because it's super annoying when for users in order to signup. Is there any workaround ? thank you
Fernando Rojo
Doorman lets you use Firebase phone auth with Expo, without detaching or opening a web view: https://doorman.cool
Kevin Rumay Castro
Fernando Rojo: Is the service free? Can you tell me about it please. I await your kind response thank you.
Fernando Rojo
Kevin Rumay Castro: It's free to test (you get 5 free test users) and then $10 / mo + $0.05 per SMS verification.
The service includes a fully customizable UI, a backend that verifies user phone numbers by sending them codes, and an integration with your Firebase auth account. I'll attach a photo of what an example looks like (from the docs).
Anibal
-
Brent Vatne
in progress
T
Tobias Cornille
Brent Vatne: Could you maybe give a rough timeline estimate?
Brent Vatne
Tobias Cornille: with sdk 37
T
Tobias Cornille
Brent Vatne: great! Thanks for the update & good work :)
Izaias di Araújo
Brent Vatne: <3
Fernando Rojo
Brent Vatne: Does this mean that the signInWithPhoneNumber method will work without having to do the JS SDK's required captcha?
Brent Vatne
Fernando Rojo: this is what it will look like https://github.com/IjzerenHein/expo-firebase-demo/tree/master/src/screens/auth/recaptcha
see expo-firebase-auth-recaptch.mp4 for a video
Mike Ottink
Any updates on this? It has been planned for a long time now...
Brent Vatne
we can't build this in expo client currently because it requires a custom url scheme to redirect back to the app. we'll be able to do this in the future with custom client builds (like what is described on https://docs.expo.io/versions/latest/guides/adhoc-builds/) but we need to build more infrastructure first
Ilgım
Brent Vatne: OMG!
Brent Vatne
Ilgım: there are lots of other ways that phone auth can be done, eg: you can make your own service that uses twilio for this. i'm sure there are hosted services that do the same thing. don't need to use firebase for it
a
antgel
Brent Vatne: Nobody needs to use firebase for pretty much anything, but the advantage is the convenience of not having to develop and maintain a solution. What plans are there to build the necessary infrastructure for this?
Brent Vatne
antgel: firebase is one of surely many services that would offer phone auth, if not then that's a great business opportunity :P you can follow along with the infra stuff in https://github.com/expo/turtle-v2
edit: oops maybe you can't as that's a private repo it seems. we'll talk about it publicly more soon but basically working on making it possible to have more control over native builds of standalone apps and expo client
a
antgel
Brent Vatne: Thanks for the answer. I'm following the blog, so looking forward to hear the updates you mentioned. :)
Wilfredo Casas
Any updates? It's 2020!
Nikolay Maksimov
Wilfredo Casas: https://firebase.google.com/docs/auth/web/phone-auth
Wilfredo Casas
Nikolay Maksimov: but it still does not work with expo does it?
Nikolay Maksimov
Wilfredo Casas: https://github.com/HackersYacht/expo-firebase-phone-auth-sample
Wilfredo Casas
Nikolay Maksimov: thanks man I'll check this out
Wilfredo Casas
Nikolay Maksimov: Hi Nikolay, did you get to run it? I'm trying but struggling as there is no readme and I'm having problems related to npm
Nikolay Maksimov
Wilfredo Casas: Yes, I did it. Even in a hidden browser, so that the user does not see the automatic recaptcha..
Wilfredo Casas
Nikolay Maksimov: I got to run it, but the captcha keeps asking me to check "I'm not a robot" forever, even if I already checked all the crosswalks and cars. Did this happen to you as well?
Wilfredo Casas
Nikolay Maksimov: also, did you create your own website for the captcha and database in firebase to be able to use it?
Pradeep Annadurai
Wilfredo Casas: dd you find any soln to this?
Wilfredo Casas
Pradeep Annadurai: no I did not :(
Pradeep Annadurai
Wilfredo Casas: after captcha verification, it reloads the same page. is there any workaround in redirecting url?
Pradeep Annadurai
Wilfredo Casas: worked for me. In development, appurl wont work. So replace that with your local host address
Ilgım
planned, great!
M Tin
Waiting for this as wel! My project is not halted by it because it's still a work in progress but within a few months I would like to enable this future.
Hopefully it is included by then...
Load More
→