React js firebase phone authentication | Send OTP And Verify phone number |

React js firebase phone authentication | Send OTP And Verify phone number | #firebase
Code A Program...
🔹Firebase's official documentation on phone authentication: firebase.google.com/docs/auth...
🔹📁A GitHub repository containing the source code for the tutorial can be found at:
github.com/Sridhar-C-25/phone...
We also recommend checking out other tutorials and documentation on Firebase and React JS to gain a deeper understanding of how these technologies work together.
In this tutorial, we will be covering the process of implementing phone authentication in a React JS application using Firebase. We will be using Firebase v9 Auth for this tutorial. We will be covering the following steps:
🔹Setting up a Firebase project and enabling phone authentication
🔹Installing and configuring the Firebase SDK in our React JS application
🔹Creating a form for users to enter their phone number
🔹Sending an OTP to the user's phone number
Verifying the OTP and logging the user in
This tutorial is perfect for web developers looking to add phone authentication to their React JS projects or mobile app developers looking to build mobile apps that require phone authentication. By the end of this tutorial, you will have a solid understanding of how to implement phone authentication in a React JS application using Firebase v9 Auth.
👬 Follow us on :
Github : github.com/Sridhar-C-25
Instagram: / codeaprogram
👍Thanks for watching!
Make sure to like + Subscribe For More!❤️
#firebase #reactjs

Пікірлер: 96

  • @ashik_mahmood
    @ashik_mahmood2 ай бұрын

    Got the lesson useful. That's why subscribing the channel. Hope for the best brother.

  • @pawanyadav4024
    @pawanyadav4024 Жыл бұрын

    Thanks sridhar , the video and code was really helpful

  • @ManishYadav-vm6lk
    @ManishYadav-vm6lkАй бұрын

    Brother, I was very worried, I was not able to do it. When I saw your video, my problem got solved. Very very thanks brother.

  • @developerakhter______0076
    @developerakhter______0076 Жыл бұрын

    *You are a genius mann.... Gained 1 subscriber*

  • @ankitprajapati3728
    @ankitprajapati3728 Жыл бұрын

    love you bro code is working i face error on phone authentication many times but you solved

  • @himanshutiwari159
    @himanshutiwari159 Жыл бұрын

    Please make a video for email verification also using firebase and tailwind also.

  • @preshndams
    @preshndams Жыл бұрын

    Impressive guys

  • @ThiNguyen-mr3db
    @ThiNguyen-mr3db10 ай бұрын

    Thank you so much bro. You saved the day!

  • @rfryanfavour4369
    @rfryanfavour4369 Жыл бұрын

    But now ill use all of these 😂❤ appreciate bro

  • @rfryanfavour4369
    @rfryanfavour4369 Жыл бұрын

    That input was all i needed thanks❤

  • @user-rf5ci8rf2p

    @user-rf5ci8rf2p

    4 ай бұрын

    0000000000000000

  • @luisaquinoc6548
    @luisaquinoc6548 Жыл бұрын

    Me encantó.... Excelente !!! gracias por compartir !!!

  • @user-kp6tw7ft6g
    @user-kp6tw7ft6g13 күн бұрын

    Very useful tutorial, it is working for me. Thank you.

  • @chukslite
    @chukslite Жыл бұрын

    This is wonderful.

  • @anassamire2980
    @anassamire29807 ай бұрын

    This was useful but I ran into a problem when I accessed the global file and entered the Index.html project I find this page is blank, please reply

  • @pintudebnath1524
    @pintudebnath152411 ай бұрын

    Thank you it worked without any problems thank you so much

  • @SwapnilSoni
    @SwapnilSoni Жыл бұрын

    so keeping these credentials on client side is safe?

  • @danielvega646
    @danielvega64610 ай бұрын

    Is this freemium? Or do I have to pay something from the beginning? thank you so much for uploading this!

  • @matei5054
    @matei50549 ай бұрын

    17:06 for firebase

  • @msdrd
    @msdrd Жыл бұрын

    Dude , I can sign in with phone number also I can sign out with phone number but I couldnt solve how can I login with phone number ???

  • @user-cu7yt3ex6k
    @user-cu7yt3ex6k11 ай бұрын

    Component auth has not been registered yet , getting this error could anyone please solve this

  • @user-cu7yt3ex6k
    @user-cu7yt3ex6k11 ай бұрын

    Component auth has not been registered yet , bro can make solution for this

  • @mohdarish4195
    @mohdarish4195Ай бұрын

    Awesome🎉

  • @sakavytech9141
    @sakavytech91417 ай бұрын

    bro can u help doing vue 3 js too . i tried but it's not working well

  • @PavanArjunSR
    @PavanArjunSR Жыл бұрын

    thank u sooooooooooooooooooooooo much bro.

  • @prajjwalsharma6700
    @prajjwalsharma6700 Жыл бұрын

    i am getting "Error updating phone" while saving phone auth in firebase

  • @vanpariyadeep2084
    @vanpariyadeep20849 ай бұрын

    Very impressive But how to keep logged in?

  • @msdrd
    @msdrd Жыл бұрын

    Hello I did it also I can signout but how can I login ???

  • @shreeyanshsingh6623
    @shreeyanshsingh66237 ай бұрын

    How you added that recaptcha which you had shown in the starting "Send Code Via SMS"?

  • @satyamkumar6469

    @satyamkumar6469

    5 ай бұрын

    You can put size to normal instead of invisible in recaptchaVerifier

  • @mahipalkeluth3740
    @mahipalkeluth374010 ай бұрын

    For me it is showing toast not defined

  • @prathmeshsagole4325
    @prathmeshsagole43253 ай бұрын

    Does the otp code comes from the sms??

  • @anhnguyenhoai9003
    @anhnguyenhoai90034 ай бұрын

    done it. thanks

  • @asfandkhan6206
    @asfandkhan620610 ай бұрын

    can you help, its not working on my web... :(

  • @user-jr6jv1xi7b
    @user-jr6jv1xi7b Жыл бұрын

    I'm getting an error that says "cannot read undefined (reading 'appVerificationDisabledForTesing') so what can I do now??? 😭

  • @vaibhawkr3904

    @vaibhawkr3904

    11 ай бұрын

    found any solution?

  • @feelthemusic3511

    @feelthemusic3511

    10 ай бұрын

    I also get it bro you found any solution

  • @biraniv

    @biraniv

    9 ай бұрын

    I faced the same issue and fixed it by editing the function like this: const onSignup = () => { setLoading(true) onCaptchVerify() const appVerifier = window.recaptchaVerifier; const formatPh = '+' + ph; signInWithPhoneNumber(auth, formatPh, appVerifier) .then((confirmationResult) => { window.confirmationResult = confirmationResult; setLoading(false) setShowOTP(true) toast.success("OTP sended successfully!") }).catch((error) => { console.log(error) setLoading(false) }); }

  • @Frontend-oy5cx
    @Frontend-oy5cx2 ай бұрын

    Why does he only send SMS to my number and not others?

  • @lahikahmed9253

    @lahikahmed9253

    2 ай бұрын

    I think it's for free version. You should pay for verify other numbers

  • @Frontend-oy5cx

    @Frontend-oy5cx

    2 ай бұрын

    @@lahikahmed9253 thanks

  • @user-wc7pm1oj2n
    @user-wc7pm1oj2n4 ай бұрын

    Great content

  • @CodeAProgram

    @CodeAProgram

    4 ай бұрын

    Thank you, share and subscribe

  • @nithishar2781
    @nithishar2781 Жыл бұрын

    TypeError: Cannot read properties of undefined (reading 'appVerificationDisabledForTesting') I used the same method but I am ending up with this error, can u please help me with it

  • @hardikmaind9833

    @hardikmaind9833

    Жыл бұрын

    i am facing the same error bro

  • @vaibhawkr3904

    @vaibhawkr3904

    11 ай бұрын

    any solution?

  • @user-cu7yt3ex6k

    @user-cu7yt3ex6k

    11 ай бұрын

    Component auth has not been registered yet I am getting this error

  • @mahimaarora2841

    @mahimaarora2841

    10 ай бұрын

    did you get the solution?

  • @biraniv

    @biraniv

    9 ай бұрын

    I faced the same issue and fixed it by editing the function like this: const onSignup = () => { setLoading(true) onCaptchVerify() const appVerifier = window.recaptchaVerifier; const formatPh = '+' + ph; signInWithPhoneNumber(auth, formatPh, appVerifier) .then((confirmationResult) => { window.confirmationResult = confirmationResult; setLoading(false) setShowOTP(true) toast.success("OTP sended successfully!") }).catch((error) => { console.log(error) setLoading(false) }); }

  • @OnlyJavascript
    @OnlyJavascript Жыл бұрын

    perfect.

  • @garryparker4753
    @garryparker4753 Жыл бұрын

    thanks bro this video is very helpful

  • @CodeAProgram

    @CodeAProgram

    Жыл бұрын

    Share and subscribe ❤️

  • @garryparker4753

    @garryparker4753

    Жыл бұрын

    @@CodeAProgram ok

  • @MuhammadAhmad-vc6xd
    @MuhammadAhmad-vc6xd24 күн бұрын

    it give me Cannot read properties of undefined (reading 'appVerificationDisabledForTesting') ........and soo on

  • @MuhammadAhmad-vc6xd

    @MuhammadAhmad-vc6xd

    24 күн бұрын

    I FOUND THE SOLUTION: (Use this function in the code) function onCaptchVerify() { if (!window.recaptchaVerifier) { window.recaptchaVerifier = new RecaptchaVerifier( auth, "recaptcha-container", { size: "invisible", callback: (response) => { onSignup(); }, "expired-callback": () => {}, } ); } }

  • @Andres-mu3ng
    @Andres-mu3ng8 ай бұрын

    Thanks its very interesting

  • @Andres-mu3ng

    @Andres-mu3ng

    8 ай бұрын

    Only i have a cuestion why return Recapcha error? FirebaseError: Firebase: Recaptcha verification failed - DUPE (auth/captcha-check-failed).

  • @moises-native4829
    @moises-native48299 ай бұрын

    Si quieres editar el numero e ir atras lo pensaste ? Como harias ? dos paginas o trabajar el back button ?

  • @ShoxzodRunning
    @ShoxzodRunning5 ай бұрын

    ❤❤❤❤❤❤❤

  • @AbhayDeshwal-sj5bg
    @AbhayDeshwal-sj5bgКүн бұрын

    please tell me what is your theme name of vs code

  • @user-ub9pd5yl7p
    @user-ub9pd5yl7p9 ай бұрын

    can anyone give code beacuse this github is not working in my vs code.

  • @OnlyJavascript
    @OnlyJavascript Жыл бұрын

    can we do this in MERN stack?? If possible can you teach us?

  • @OnlyJavascript

    @OnlyJavascript

    Жыл бұрын

    Can you please teach us complete auth system in MERN stack including this otp feature.

  • @yashsinha9204
    @yashsinha92048 ай бұрын

    FirebaseError: Firebase: Exceeded quota. (auth/quota-exceeded). Do I need to upgrade the firebase plan?

  • @nimat9034

    @nimat9034

    8 ай бұрын

    Yes you have to upgrade to blaze or create a new project.

  • @BeingChoudhary
    @BeingChoudhary11 ай бұрын

    what is the name of your code editor theme and who built that?

  • @TheRageCommenter

    @TheRageCommenter

    4 ай бұрын

    It's vsCode as the editor and the theme is called Synthwave '84. To get the glow around the words you need to do extra set up described on the theme's install page. Good luck.

  • @macanari
    @macanari Жыл бұрын

    can't run it on vscode

  • @user-ny2cy8xo8m
    @user-ny2cy8xo8m10 ай бұрын

    getting error Cannot read properties of undefined (reading 'appVerificationDisabledForTesting') TypeError: Cannot read properties of undefined (reading 'appVerificationDisabledForTesting') help me out with solution?

  • @biraniv

    @biraniv

    9 ай бұрын

    I faced the same issue and fixed it by editing the function like this: const onSignup = () => { setLoading(true) onCaptchVerify() const appVerifier = window.recaptchaVerifier; const formatPh = '+' + ph; signInWithPhoneNumber(auth, formatPh, appVerifier) .then((confirmationResult) => { window.confirmationResult = confirmationResult; setLoading(false) setShowOTP(true) toast.success("OTP sended successfully!") }).catch((error) => { console.log(error) setLoading(false) }); }

  • @user-ny2cy8xo8m

    @user-ny2cy8xo8m

    9 ай бұрын

    thank u @@biraniv

  • @user-iz6lx7lr5r
    @user-iz6lx7lr5r3 ай бұрын

    I did everything but appVerificationDisabledfor testing error is coming

  • @Vampion

    @Vampion

    3 ай бұрын

    yes i created video for solution kzread.info/dash/bejne/oaODrLuwZ6zLkZM.html

  • @roar3850
    @roar3850 Жыл бұрын

    bro what is theme name? your code have gradient effect.

  • @CodeAProgram

    @CodeAProgram

    Жыл бұрын

    Synthwave 84

  • @roar3850

    @roar3850

    Жыл бұрын

    Thanks bro

  • @dragonwarrior7246
    @dragonwarrior724611 ай бұрын

    is capcha verification compulsary for phone authentication ?

  • @satyamkumar6469

    @satyamkumar6469

    5 ай бұрын

    Not sure that it is necessary but firebase doc says it needs to be verified to check this requests comes from the right person (not from attacker)

  • @ajayratnaparkhi7069
    @ajayratnaparkhi7069 Жыл бұрын

    which vscode theme u r using

  • @CodeAProgram

    @CodeAProgram

    Жыл бұрын

    Synthwave 84

  • @mahimaarora2841
    @mahimaarora284110 ай бұрын

    Can someone please help me with this error: Cannot read properties of undefined (reading 'appVerificationDisabledForTesting') TypeError: Cannot read properties of undefined (reading 'appVerificationDisabledForTesting') at new RecaptchaVerifier

  • @Nh_Sohan

    @Nh_Sohan

    10 ай бұрын

    same problem

  • @biraniv

    @biraniv

    9 ай бұрын

    I faced the same issue and fixed it by editing the function like this: const onSignup = () => { setLoading(true) onCaptchVerify() const appVerifier = window.recaptchaVerifier; const formatPh = '+' + ph; signInWithPhoneNumber(auth, formatPh, appVerifier) .then((confirmationResult) => { window.confirmationResult = confirmationResult; setLoading(false) setShowOTP(true) toast.success("OTP sended successfully!") }).catch((error) => { console.log(error) setLoading(false) }); }

  • @nandinirouth8737

    @nandinirouth8737

    9 ай бұрын

    hey i tried your code still getting the same error @@biraniv

  • @MARUSIIIIA

    @MARUSIIIIA

    5 ай бұрын

    In Firebase v10 - ther order of arguments in RecaptchaVerifier changed, 'auth' comes first: window.recaptchaVerifier = new RecaptchaVerifier( auth, "recaptcha-container", { size: "invisible", callback: (response) => { onSignup(); }, "expired-callback": () => { }, } );

  • @MARUSIIIIA

    @MARUSIIIIA

    5 ай бұрын

    in Firebase v.10 RecaptchaVerifier seems to have another order of arguments, 'auth' comes first. Try this code: window.recaptchaVerifier = new RecaptchaVerifier( auth, "recaptcha-container", { size: "invisible", callback: (response) => { onSignup(); }, "expired-callback": () => { }, } );

  • @pIayer157
    @pIayer1576 күн бұрын

    Too many unnecessary things, just get straight to the point!

  • @SandeepMaraboina
    @SandeepMaraboinaАй бұрын

    i am getting this error when i solve captcha Uncaught TypeError: Cannot read properties of null (reading 'style') at Array. (recaptcha__en.js:506:268) at b1. (recaptcha__en.js:449:86)

  • @msdrd
    @msdrd10 ай бұрын

    { "error": { "code": 400, "message": "TOO_MANY_ATTEMPTS_TRY_LATER", "errors": [ { "message": "TOO_MANY_ATTEMPTS_TRY_LATER", "domain": "global", "reason": "invalid" } ] } }

  • @askarzhaanbaev5834
    @askarzhaanbaev583410 ай бұрын

    index-9a76d29a.js:8079 Uncaught TypeError: Cannot read properties of undefined (reading 'appVerificationDisabledForTesting') HELP

  • @biraniv

    @biraniv

    9 ай бұрын

    I faced the same issue and fixed it by editing the function like this: const onSignup = () => { setLoading(true) onCaptchVerify() const appVerifier = window.recaptchaVerifier; const formatPh = '+' + ph; signInWithPhoneNumber(auth, formatPh, appVerifier) .then((confirmationResult) => { window.confirmationResult = confirmationResult; setLoading(false) setShowOTP(true) toast.success("OTP sended successfully!") }).catch((error) => { console.log(error) setLoading(false) }); }

  • @adamdevelops
    @adamdevelops Жыл бұрын

    Thank you so much bro. You saved the day!