Firebase phone number authentication in javascript | firebase auth in javascript | HA Codes

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ก.ค. 2024
  • Hi, In this video, we will create firebase phone number authentication in javascript. We will send OTP to number and then verify that number using OTP. For this, we use firebase auth to send OTP that is a free service from google. Follow the video to create the project and get help from the source code given below. Comment below in the comment section if you get an error or have any suggestion.
    Check Live Demo
    bit.ly/3Dhz3Au
    Source Code:
    bit.ly/3sz8Ubt
    Chapters:
    00:00 Intro
    01:31 HTML & CSS
    05:08 Firebase
    07:04 Javascript
    firebase auth
    Firebase phone number authentication
    #HACodes
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 73

  • @relaxtomaxchannel
    @relaxtomaxchannel ปีที่แล้ว +2

    Thank you very much, the clearest tutorial. period.

  • @shraddhapatil2538
    @shraddhapatil2538 4 หลายเดือนก่อน +2

    Thank you so much for this video. It's really worked. If anyone have host issue then just add your domain into firebase.

  • @RexBrown-dv4yc
    @RexBrown-dv4yc 2 หลายเดือนก่อน

    Thank you. Your video has really helped my app

  • @nguyenthaihien1704
    @nguyenthaihien1704 ปีที่แล้ว

    Thank you very much for sharing very nice and useful

  • @judon5677
    @judon5677 ปีที่แล้ว

    Thanku you So Much 💓 Keep it up.

  • @sathvikaparimi2150
    @sathvikaparimi2150 7 หลายเดือนก่อน

    Thank you, Its working.

  • @ciel37yearsago42
    @ciel37yearsago42 3 หลายเดือนก่อน

    no errors on console, used my country code. still not receiving otp on phone. idk whats wrong

  • @murtazaahmad1539
    @murtazaahmad1539 8 วันที่ผ่านมา

    source code links not working and some of the code that you have written is also not working

  • @razy_music
    @razy_music วันที่ผ่านมา

    Recaptcha not coming up, please help.

  • @565_ankitkumar2
    @565_ankitkumar2 3 หลายเดือนก่อน +1

    is it necessary to write code under xampp
    my project is running under server 3000 , can i merge there,..?

    • @hacodes
      @hacodes  3 หลายเดือนก่อน

      Yes, you can use any port or any server.

  • @sahasiyer8471
    @sahasiyer8471 11 หลายเดือนก่อน

    I’m getting ‘appVerificationDisabledForTesting’ error. How to fix this? Please help me out, I have an assignment to submit in 2 days. Actually I did the project in react.

    • @hacodes
      @hacodes  11 หลายเดือนก่อน +1

      May be this is captcha verification error that is disabled in test mode try this in production mode. If not work, use Firebase documentation for react.

  • @faltu3489
    @faltu3489 ปีที่แล้ว

    How can i show the otp code in alert after send sms, just for personal testing.....

    • @hacodes
      @hacodes  ปีที่แล้ว

      It's not giving otp code on the client side, it just take otp from client side to the server when user enter otp, and just return conformation on the client side.

  • @vasukotadiya9329
    @vasukotadiya9329 ปีที่แล้ว

    cannot read properties of undefined(reading verify)

    • @hacodes
      @hacodes  ปีที่แล้ว

      Try with adding number with country code

  • @jeromedelapena7667
    @jeromedelapena7667 ปีที่แล้ว

    Nice work! But I have hard time editing the code to fit to our final project. How can I redirect user after successful verification? Thanks! ❤

    • @hacodes
      @hacodes  ปีที่แล้ว +1

      Use window.location.href = "your-redirect-url" in then function

  • @yasanmalik7189
    @yasanmalik7189 ปีที่แล้ว

    what is code result in codeverify method

    • @hacodes
      @hacodes  ปีที่แล้ว +1

      coderesult as an object define in firebase js file and confirm() is a function defined in the class for which the coderesult object is created.

  • @darshgautam912
    @darshgautam912 10 หลายเดือนก่อน +1

    yeh bhaiya firebase sdk waala link kaha se mila jo script mein dalaa hua hain 63 line mein

    • @hacodes
      @hacodes  10 หลายเดือนก่อน

      Search on google for Firebase CDN, you will get CDNJS website, get your needed CDN from there.

  • @abdimajidsaedadam9490
    @abdimajidsaedadam9490 9 หลายเดือนก่อน

    can i use without captcha or hide the captcha, please.

    • @hacodes
      @hacodes  9 หลายเดือนก่อน +1

      May be there is a way to do that but doesn't know about that. You need to check the documentation of the Firebase

  • @reshmasharma2931
    @reshmasharma2931 ปีที่แล้ว

    nice video,error coming

    • @hacodes
      @hacodes  ปีที่แล้ว

      Which error

  • @danielagu7117
    @danielagu7117 ปีที่แล้ว

    How's your phone connected to your laptop

    • @hacodes
      @hacodes  ปีที่แล้ว +1

      I am using scrcpy, it's a cmd open source software for windows

  • @developerprofile6565
    @developerprofile6565 ปีที่แล้ว

    It shows that a error :- Firebase is not defined !
    How to fix it ?

    • @hacodes
      @hacodes  ปีที่แล้ว +1

      Firebase SDK not added properly, try correct the path of Firebase CDN

    • @developerprofile6565
      @developerprofile6565 ปีที่แล้ว

      @@hacodes thanks

  • @worldwidetechchannel9699
    @worldwidetechchannel9699 9 หลายเดือนก่อน

    Bro this code is not working .... Please help me ...

    • @hacodes
      @hacodes  9 หลายเดือนก่อน

      What error you are getting?

  • @danielagu7117
    @danielagu7117 ปีที่แล้ว

    Error "hostname not found" how do I go about this please?

    • @hacodes
      @hacodes  ปีที่แล้ว

      I am using app check to secure my firebase resources. Create your own firebase project and try with that. If still getting the same issue, try removing browser cache, try use other browser or wait untill my project token will expire.

    • @danielagu7117
      @danielagu7117 ปีที่แล้ว

      @@hacodesThis is the new error after I created my project " Firebase: Hostname match not found (auth/captcha-check-failed). "

    • @hacodes
      @hacodes  ปีที่แล้ว

      Contact me on FB

    • @-MrHow-
      @-MrHow- 9 หลายเดือนก่อน

      i get same problem what is the solution?@@hacodes

  • @pasdes6091
    @pasdes6091 ปีที่แล้ว

    sir i am getting error as Hostname match not found

    • @hacodes
      @hacodes  ปีที่แล้ว

      I have enabled app check for Firebase services. Now it's disable, try it now

    • @pasdes6091
      @pasdes6091 ปีที่แล้ว

      @@hacodes sir thank you so much for replying i have tried same error i am facing

    • @pasdes6091
      @pasdes6091 ปีที่แล้ว

      @@hacodes hello sir i have riched out you on linked in can you connect if possible

    • @hacodes
      @hacodes  ปีที่แล้ว

      Contact me on FB, I'll do further, page link in about of this channel

  • @sakshidighade9104
    @sakshidighade9104 11 หลายเดือนก่อน

    how to add firebase sdk in line number 63 that src link where from you take

    • @hacodes
      @hacodes  11 หลายเดือนก่อน

      Search on Google "firebase cdn js" you will find a website cdnjs. You can get CDN links from that website. Make sure to use compat links if you want to use mithout type module.

  • @aayushrajmaurya2003
    @aayushrajmaurya2003 4 หลายเดือนก่อน

    Bro and Hostname match not found coming

    • @aayushrajmaurya2003
      @aayushrajmaurya2003 4 หลายเดือนก่อน

      Please help me sir

    • @hacodes
      @hacodes  4 หลายเดือนก่อน

      That's app check enable on my firebase app. Please use your firebase app credentials.

    • @aayushrajmaurya2003
      @aayushrajmaurya2003 4 หลายเดือนก่อน

      @@hacodes please tell me what do i change in my code, and how I use my firebase app.

    • @hacodes
      @hacodes  4 หลายเดือนก่อน +1

      The whole process has shown in video, just do step by step in your firebase proj and get your credentials. Then the source code you downloaded, just replace credentials means firebaseConfig object there in code. If still getting issue, try after clearing cache or use some other browser.

  • @852ebiz7
    @852ebiz7 ปีที่แล้ว

    No verification code send out

    • @hacodes
      @hacodes  ปีที่แล้ว

      Is there any message in console, if not try again using your country code with number.

  • @thepurveshpanchal
    @thepurveshpanchal ปีที่แล้ว

    I tried the same but the console shows nothing after clicking captcha and send button
    I used my own firebase keys and stuff but still...doesn't seem to be working

    • @hacodes
      @hacodes  ปีที่แล้ว

      Can you share your complete code with keys, I'll check

    • @thepurveshpanchal
      @thepurveshpanchal ปีที่แล้ว

      @@hacodes Where should I send it?

    • @hacodes
      @hacodes  ปีที่แล้ว

      On FB, please check the channel about for page link

  • @youthsorg
    @youthsorg ปีที่แล้ว

    Apreciatable work, but not working from my side.

    • @hacodes
      @hacodes  ปีที่แล้ว

      Tell me the error you got, I'll try to fix it

    • @youthsorg
      @youthsorg ปีที่แล้ว

      @@hacodes I've got no response from it. Finally downloaded your script and it's working.

  • @rishabhgarg8349
    @rishabhgarg8349 4 หลายเดือนก่อน

    OTP not coming in phone

    • @hacodes
      @hacodes  4 หลายเดือนก่อน

      Are you getting error in console?

    • @rishabhgarg8349
      @rishabhgarg8349 4 หลายเดือนก่อน

      Yes

  • @darshanbs2267
    @darshanbs2267 ปีที่แล้ว

    Where to find sdk version from where u copied

    • @hacodes
      @hacodes  ปีที่แล้ว

      You can search on google for Firebase js sdk cdn and you will get cdn js website or any other where you can get all cdn. You can also check firebase documentation for that.

  • @Nischaltamang2023
    @Nischaltamang2023 5 หลายเดือนก่อน

    need your help on this project. how to contact you on fb?

    • @hacodes
      @hacodes  5 หลายเดือนก่อน

      You can get FB link from about of this channel.

    • @Nischaltamang2023
      @Nischaltamang2023 5 หลายเดือนก่อน

      @@hacodes even on your live demo, while trying my number it says: Firebase: Hostname match not found (auth/captcha-check-failed).

    • @hacodes
      @hacodes  5 หลายเดือนก่อน

      I think you used my provided firebase credentials that is secured with firebase app check. Create your own firebase app and before using clear browser cache etc.