Phone Authentication Using Firebase and Expo | OTP Login | React Native Tutorial | JavaScript Code

Поделиться
HTML-код
  • Опубликовано: 26 сен 2024
  • Updated Video Link: • Updated OTP Authentica...
    Source Code & more: / bugninza
    Hello guys, My name is Rohit Kumar Thakur. In this video, I am gonna show you, how to authenticate to your react native expo mobile device using One time password. In the project, I am using the latest version of firebase sdk, which is version 9. React Native Expo is a cross platform framework, which gonna helps you to build mobile apps for both Android & iOS devices. The code part is not that much tough. You just have to follow the video to get the desired output. Happy Hacking
    𝐁𝐨𝐨𝐤 ( 𝐅𝐫𝐨𝐦 𝐂𝐨𝐝𝐞 𝐓𝐨 𝐂𝐨𝐧𝐧𝐞𝐜𝐭𝐢𝐨𝐧𝐬: 𝐀 𝐃𝐞𝐯𝐞𝐥𝐨𝐩𝐞𝐫’𝐬 𝐠𝐮𝐢𝐝𝐞 𝐭𝐨 𝐛𝐮𝐢𝐥𝐝𝐢𝐧𝐠 𝐚 𝐬𝐨𝐜𝐢𝐚𝐥 𝐜𝐚𝐫𝐞𝐞𝐫 )
    Amazon India: amzn.eu/d/axYh0B4
    Amazon Worldwide: a.co/d/acqJOYR
    Gumroad (pdf): ninza7.gumroad...
    Topics covered:
    ✅ Full Setup of Firebase Application
    ✅ Start a React Native Expo Application
    ✅ Installation of Firebase SDK in react native expo app
    ✅ Use of useState hook to add the data to database
    ✅ Minimal UI-UX
    ✅ Otp login in mobile device
    ✅Otp login code tutorial with UI-UX
    ✅ What is firebase
    My social Links:
    Instagram: / _ninza7
    Twitter: / _ninza7
    Website: ninza7.me
    Video widgets edited by: / kaushal_2319
    Music Source: NCS
    Tags: firebase, firebase tutorial, what is firebase, firebase tutorial in hindi, firestore, firebase database, react firebase, firebase react, firebase realtime database, react native, react native tutorial, react native tutorial in hindi, react native project, react native tutorial for beginners, react native app, react native full course, react native navigation, native react, react native course, react native projects, what is react native, react native app development, react native firebase, react native crash course, react native ui, learn react native, flatlist react native, react native in hindi, react native tutorial for beginners, react native app development, react native project from scratch, react js. expo react native, react native tutorial for beginners, phone authentication in react native, otp login using react native and firebase, Firebase, firebase console, google firebase, react native firebase, firebase database, firebase pricing, firebase auth, firebase analytics, firebase authentication, firebase login, firebase cloud messaging, firebase storage, react firebase, npm firebase, firebase tutorial, firebase app, firebase sdk, google firebase console, firebase crashlytics, react native firebase auth, firebase fcm, reactfire, firebase web, firebase android, firebase ios, firebase backend, firebase cloud, firebase cloud storage,
    #reactjs #javascript #reactnative #ios #android #react #firebase

Комментарии • 125

  • @BugNinza
    @BugNinza  8 месяцев назад

    Updatd Video Tutorial Link: ruclips.net/video/CzjHl9uo8tY/видео.html

  • @BugNinza
    @BugNinza  2 года назад +1

    Do Subscribe and keep supporting❤️

  • @eklavyachandra
    @eklavyachandra Год назад +2

    Is there any problem with expo-firebase-recaptcha. Mine is encountering errors. Please help me

    • @BugNinza
      @BugNinza  Год назад +1

      Tell me more about your error. DM me incase

    • @eklavyachandra
      @eklavyachandra Год назад +1

      @@BugNinza Actually problem is in documentations of google, idk why they did not provide a good documentation for latest version. I managed it and it worked after a long time of hussle. ChatGPT was also unable to solve the error, but it finally worked tho. Only have a warning in my app now. I will also a write a blog on it, because many people may face the same problem in future.

  • @R.K.P.K_VAPI
    @R.K.P.K_VAPI 10 месяцев назад

    bahot bahot thank you bhai ho gaya aaj me 10 din se paresan tha par aaj hua
    thank you

    • @BugNinza
      @BugNinza  10 месяцев назад

      Keep supporting 🙌

  • @jenny47111
    @jenny47111 11 месяцев назад +1

    Thank you so much!!!!! I is amazing! it works well!!!

    • @BugNinza
      @BugNinza  11 месяцев назад

      Keep supporting 🙌

  • @MrDbd220
    @MrDbd220 2 года назад +3

    How to remove recaptcha ??

  • @skez4774
    @skez4774 8 месяцев назад +1

    Deprecated now. Can't use expo-firebase-recaptcha anymore :(

    • @BugNinza
      @BugNinza  8 месяцев назад +1

      I'll update it soon. Stay tuned

    • @skez4774
      @skez4774 8 месяцев назад

      @@BugNinza haha do you have some hints pls, of where I can find a working tutorial. I'm kinda blocked rn and I have a deadline. The solutions I have don't really work with Node.js I guess :/

  • @oluadabonyan3876
    @oluadabonyan3876 9 месяцев назад

    II came across this error message; new PhoneAuthProvider()` is not supported on the native Firebase SDK. How do I resolve this?

    • @BugNinza
      @BugNinza  9 месяцев назад

      i'll update the otp app with native sdk soon

  • @MohammedAbdulHannan-y2z
    @MohammedAbdulHannan-y2z Месяц назад

    does this phone auth works for web??

  • @iVigilxnte
    @iVigilxnte Год назад +1

    Hey do you by any chance know why I'm getting this error when it calls the sendVerification function:
    TypeError: null is not an object (evaluating 'verifier.verify')

    • @BugNinza
      @BugNinza  Год назад

      It's a type error. Check your code

    • @iVigilxnte
      @iVigilxnte Год назад +1

      @@BugNinza but i have the exact same code you have in your sendVerification function and usestate variables

    • @iVigilxnte
      @iVigilxnte Год назад +1

      Nevermind. For some reason I dont get that error anymore. But now my error says:
      Error: Missing "authDomain" in firebase web configuration.

    • @iVigilxnte
      @iVigilxnte Год назад +1

      Its fixed now. Sorry

    • @fananizhl
      @fananizhl Год назад +1

      @@iVigilxnte how you fix this error "Error: Missing "authDomain" in firebase web configuration." in your code ? please help me I get same error

  • @gunjanrajtiwari1435
    @gunjanrajtiwari1435 Год назад +1

    firebase.auth().signInWithCredential not working

  • @jna96864
    @jna96864 Год назад

    I followed the instructions but this didnt work. First error with auth property firebase core. property verify. A lot of trouble. Why you said not to test with expo go when you did at the end of the video

    • @BugNinza
      @BugNinza  Год назад

      No, it's not like that, this code is fully tested and it's working. You can test your code in the expo go app. because we are not using any native code here

  • @ibrahimaltawil528
    @ibrahimaltawil528 2 года назад +3

    Hey bud, could you share the source code? thanks

  • @ibidapoayomide6825
    @ibidapoayomide6825 2 года назад +1

    Nice tutorial, please can you do a tutorial on how to register using Name, Email, Password and Add the otp function to it
    Thanks

  • @РоманРоманько-я3и
    @РоманРоманько-я3и 8 месяцев назад

    Hi sir! Can you please make extra video since a lot of packages is deprecated now😅
    It would be great to see a video with the new implementation from you

    • @BugNinza
      @BugNinza  8 месяцев назад

      Soon.. buddy.. stay tuned 🤜🤛

  • @kelkayam
    @kelkayam 11 месяцев назад

    I did all step by step and I getting 'WARN No native ExpoFirebaseCore module found, are you sure the expo-firebase-core module is linked properly?'
    and the verification message does not sent.
    if someone here can help me, please replay

    • @BugNinza
      @BugNinza  11 месяцев назад

      check your config.js file

  • @JesseySitima
    @JesseySitima Год назад

    dude your video helped me alot, you are amazing.

    • @BugNinza
      @BugNinza  Год назад

      Glad I could help! Keep supporting

  • @venkatsai6311
    @venkatsai6311 7 месяцев назад

    Thank you, this video is helpful

    • @BugNinza
      @BugNinza  7 месяцев назад

      Keep supporting 🙌

  • @vandal_NKB
    @vandal_NKB Год назад

    I have successfully implemented it but how do I remove the reCAPTCHA window? The client doesn't want that.

    • @ayeshaarshad3403
      @ayeshaarshad3403 Год назад

      i think there is a invisible recaptcha option too

    • @vandal_NKB
      @vandal_NKB Год назад

      @@ayeshaarshad3403 there is an “attemptInvisibleVerification” prop on “FirebaseRecaptchaVerifierModal” but when set to true, it still doesn’t behave as expected

  • @sudhakarindla-u2v
    @sudhakarindla-u2v Год назад

    I am getting No Firebase App[Default] has been created-call firebase App.initialzeApp()(app-compat/no-app) error bro how to get off from these error

    • @almustarik
      @almustarik 11 месяцев назад

      Please check your initialization for firebase instance

  • @ShortsSpectrumS2
    @ShortsSpectrumS2 Год назад +1

    In sdk 48 version, the expo firebase core warning window appears. Phone number authentication works fine. Doesn't it matter?

    • @eisaatana6311
      @eisaatana6311 Год назад

      how did u got it working with sdk 48 version?

  • @Mohammedasif-su5fc
    @Mohammedasif-su5fc 2 года назад

    Nice tutorial ,very clear explanation, please can you do a tutorial on how to register using Name, Email, Password

    • @BugNinza
      @BugNinza  2 года назад

      It's already there: ruclips.net/video/lBUjggiWQ1U/видео.html
      Keep supporting❤️

  • @СергійШацовний-ю5п

    how fix in expo No native ExpoFirebaseCore module found, are you sure the expo-firebase-core module is linked properly?

    • @BugNinza
      @BugNinza  Год назад

      There might be some issues with the project set-up.
      And don't test your code using the expo go app. It won't work

    • @jna96864
      @jna96864 Год назад

      why you did?

    • @kelkayam
      @kelkayam 11 месяцев назад

      but in the video you're using expo go app, no?@@BugNinza

  • @SKJ_Diaries
    @SKJ_Diaries Год назад

    I got the error: Couldn't resolve ExpoFirebaseCore.
    Please help me

    • @BugNinza
      @BugNinza  Год назад

      Check ypur package and installations. Follow the tutorial carefully

  • @technicalveer1389
    @technicalveer1389 Год назад

    Nice job sir. please tell us about if idon't use recapcha method in this project then what can I do 💖💖

    • @BugNinza
      @BugNinza  Год назад +1

      Recaptcha is used by Firebase to prevent automated systems from accessing the authentication process, but there are alternative methods available. Some options include using API keys with limited access or implementing your own authentication system that doesn't rely on Recaptcha. However, it is important to ensure that your authentication system is secure and not vulnerable to attack.

    • @technicalveer1389
      @technicalveer1389 Год назад

      @@BugNinza thank you so much sir 🙏🙏

  • @techboyankit1692
    @techboyankit1692 2 года назад

    Can u plz tell , how do you get all those app details to add in config.js ??

    • @BugNinza
      @BugNinza  2 года назад

      It's the firebase config keys. You can watch the video to know how to get those keys.

  • @susanshu7725
    @susanshu7725 Год назад

    I have no idea why sometimes, the verificationid is empty

  • @thanhloc3304
    @thanhloc3304 2 года назад

    Hi sir. How to use it with Vietnam phone number. Please help me

    • @BugNinza
      @BugNinza  2 года назад

      Use the vietnam country code(+84). For example, if your phone number is 111111. Then in the phone number input section. Enter: +84111111 keep supporting❤️

  • @anandgomaskar2210
    @anandgomaskar2210 Год назад

    thanku sir thanku so much upload this video

  • @MusicTime0Play
    @MusicTime0Play Год назад

    Hi. why you did not run "npm install firebase"?

    • @BugNinza
      @BugNinza  Год назад

      0:54 Don't skip the video bro

    • @MusicTime0Play
      @MusicTime0Play Год назад

      @@BugNinza thank you.. +1 subscriber here.

    • @MusicTime0Play
      @MusicTime0Play Год назад

      can you help me how to remove or hide recapcha?

  • @arjunshivhare8998
    @arjunshivhare8998 Год назад

    Great

  • @bilelrahmouni01
    @bilelrahmouni01 Год назад

    thank you Kumar 🙏

  • @ganeshborse5340
    @ganeshborse5340 Год назад

    Hey Bug Ninza, Iam stuck at this error can you help me with it, error says
    Android Bundling failed 1122ms
    Unable to resolve "react-native-webview" from "node_modules/expo-firebase-recaptcha/build/WebView.js"

    • @BugNinza
      @BugNinza  Год назад

      Install this package.
      npm i react-native-webview

  • @ako_q
    @ako_q Год назад

    Official documentations says the expo-firebase-recaptcha is going to be deprecated

    • @BugNinza
      @BugNinza  Год назад

      ll improvise

    • @navdeepshah6080
      @navdeepshah6080 Год назад

      @@BugNinza how

    • @grayb3703
      @grayb3703 Год назад

      @@BugNinza how will you improvise? Give us at least a small idea

  • @karthikvijay
    @karthikvijay Год назад

    Hi can you tell us how to remove recaptcha

    • @BugNinza
      @BugNinza  Год назад

      enable SafetyNet for Firebase Authentication or add SHA-256 fingerprint in your firebase project settings

  • @siddharthapanda1525
    @siddharthapanda1525 Год назад

    Thanks Buddy..

  • @ibidapoayomide6825
    @ibidapoayomide6825 2 года назад

    And is it firebase v9?

    • @BugNinza
      @BugNinza  2 года назад

      Yes, firebase version 9.6.11

  • @andreitrinidad
    @andreitrinidad 2 года назад

    Can we hide the recaptcha?

    • @BugNinza
      @BugNinza  2 года назад +1

      yes, then you have to enable SafetyNet for Firebase Authentication

    • @simran5094
      @simran5094 2 года назад

      @@BugNinza Hi, Can you share how to do that. In this tutorial we have created a web app in firebase , so i am not able to add SHA256 fingerprint. Can you help please?

    • @networkserpent5155
      @networkserpent5155 2 года назад +1

      its better not to because they may be bots

  • @aleksandarbisevac3129
    @aleksandarbisevac3129 2 года назад

    Thanks

  • @voldemore6300
    @voldemore6300 Год назад

    It was not work for me, but anyways thank you😢 for sharing this tutorial for us

    • @BugNinza
      @BugNinza  Год назад +1

      Hey! Feel free to share your errors. If you are not comfortable enough here then you can DM me on my social media handle

    • @voldemore6300
      @voldemore6300 Год назад

      @@BugNinza Do you think the method provider in the Firebase such as facebook, google and PhoneNumber authentication are be able to work with expo or not, I mean I have been struggling with authentication for long and some of those method in expo has shown that there are already deprecated… so could you pls confirm that the entire of the provider are be able to work perfectly fine as you experience so I could move on from firebase-authentication, anyways thank you for replying my comments🫡🫡🫡

    • @mukong5380
      @mukong5380 Год назад

      @@voldemore6300 I am facing the same issues. Actually, this video works well for Expo SDK 46 and below. Recaptcha Verifier is now deprecated and this method together with my app are no more working. I'm also searching for how to make it work again

    • @BugNinza
      @BugNinza  Год назад

      Hey, Voldemore!! Expo is trying to closing the gap between bare react native packges and expo packages. That's why few of the expo packages like google sign in, facebook sign in, etc. are depracted. You can't test the native packages using the expo application. You have use either development build method or prebuild method to test your application or you can use Android studio as well.
      I'll look into it (recaptcha verifier).

  • @kinganime9388
    @kinganime9388 9 месяцев назад

    Hi i make the same code and he give me this error
    WARN Possible Unhandled Promise Rejection (id: 0):
    FirebaseError: Firebase: Error (auth/error-code:-39).
    @BugNinza

    • @BugNinza
      @BugNinza  9 месяцев назад

      Check your firebase app rules and review your code

  • @technicalveer1389
    @technicalveer1389 Год назад

    TypeError: undefined is not an object (evaluating 'new _app.firebase.auth') Please reply

    • @BugNinza
      @BugNinza  Год назад

      It's a type error. check your code

  • @afrikanking4022
    @afrikanking4022 Год назад

    @Bug Ninza please assist I am getting this error Possible Unhandled Promise Rejection (id: 3):
    FirebaseError: Firebase: Invalid format. (auth/invalid-phone-number).
    construct@[native code]
    construct@[native code]

    • @BugNinza
      @BugNinza  Год назад

      Enter your country code before entering the phone number. Follow the video carefully..

    • @kelkayam
      @kelkayam 11 месяцев назад

      the same for me. and I added the country code (+972XXXXXXX).@@BugNinza

  • @anazi
    @anazi Год назад +2

    I wish you did it using Firebase9 modules instead of the /compat version which uses the old firebase8 modules. The code video is kind of useless now and lost. Thank you anyway.

    • @BugNinza
      @BugNinza  Год назад

      The firebase version is 9.6.11. Code video is important for step by step tutorial

    • @anazi
      @anazi Год назад +3

      @@BugNinza Yeah the version is 9.6.11 but the code used is for the oldest module of version Firebase 8.x, thats why you have added the firebase/compat, not used only 'firebase' this code or any similar codes will no longer work in version 10 or 11 of firebase. Also, most new projects are using Firebase 9 with its new modules, which will be a conflict to integrate this code. Anywho thank you really. But just keep this in mind. It took me all day yesterday to figure it out, and today after a while it finally worked.

    • @ilyadynin
      @ilyadynin Год назад

      @@anazi Hey, so did you figure it out? Could you somehow share the code since I face the same issues when trying to set it up, and all code I find is for sdk 8

    • @anazi
      @anazi Год назад

      @@ilyadynin Yup but im out of town now. Please re-send this message again as a reminder when I get back to the office to share the code here. after 24 hours

    • @zacharypagano6009
      @zacharypagano6009 Год назад

      @@anazi Could you please send to me?

  • @nat.serrano
    @nat.serrano 5 месяцев назад

    Is it possible to make the recaptcha invisible? Only required for spam

    • @BugNinza
      @BugNinza  5 месяцев назад

      Check the firebase docs

  • @dishachaurasia4502
    @dishachaurasia4502 Год назад +1

    Nice tutorial ...helped us a lot

  • @jenny47111
    @jenny47111 9 месяцев назад

    Is there any other way to use sdk49?I have try it, it is working in expogo, but when I do eas build , i got a error because of config.plugin 5.0.4..

    • @BugNinza
      @BugNinza  9 месяцев назад

      follow the video. I didn't use the expo go app

  • @PoojaYadav-ji4cq
    @PoojaYadav-ji4cq Год назад +1

    Nice tutorial ...helped us a lot

    • @BugNinza
      @BugNinza  Год назад +1

      I'm glad it helped

  • @ShortsSpectrumS2
    @ShortsSpectrumS2 Год назад

    I'm Korean I've been looking for phone number auth and thank you so much. I respect you

  • @ayeshaarshad3403
    @ayeshaarshad3403 Год назад

    May God bless you more and more , i wasted my last 2 days trying to figure this out and your video finally helped me

    • @BugNinza
      @BugNinza  Год назад

      Glad I could help! Thank you so much. You just made my day.

  • @karimdakrouri3410
    @karimdakrouri3410 Год назад

    Hi is it possible to change the name of the sender in the message to my app name?

    • @BugNinza
      @BugNinza  Год назад

      I'm not getting you. Feel free to DM me on Twitter or Instagram and discuss more

    • @karimdakrouri3410
      @karimdakrouri3410 Год назад

      @@BugNinza Hi what i mean is the OTP code received as a text message is from a number, can i change it to for example MYAPP

    • @BugNinza
      @BugNinza  Год назад

      Yes, I guess. I am not sure that firebase provides this feature in the free version.

    • @karimdakrouri3410
      @karimdakrouri3410 Год назад

      @@BugNinza After researching, i think it gets automatically updated after i load app to stores.