Adding Firebase Authentication to Back-end(Express.js) and Front-end(React)

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ต.ค. 2024
  • In this video I am going to show you how to do add authentication to your express.js server with firebase authentication.
    code: github.com/Che...
    discord:
    / discord
    Twiiter
    / sokhengchen

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

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

    Hello everyone, Thank you for your watching and
    if you want to help the channel, you can help donate to us right here.
    www.patreon.com/dailywebcoding

  • @medamineriahi7313
    @medamineriahi7313 ปีที่แล้ว +3

    2 years and the first 2 minutes helped me more than any other video... even more than the firebase docs

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

    one of the simplest firebase fullstack tutorial on youtube. Was so easy to follow

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

    I just feel like i watched the video only for 5 minutes not for 35 minutes. smart tutorial thanks.

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

    Thank you so much man for this video I graduated from a bootcamp and somehow ended up freelancing I needed this.

  • @joewatson8357
    @joewatson8357 ปีที่แล้ว +6

    Why do people not make videos on the backend like this with React and the Firebase admin SDK? is easier on the back end than on the front end, so that's why they think, Oh, it's not necessary. Please give me some ideas to find a solution.

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

    Thank you very much, I was looking for such a video all over TH-cam but no one had this content.

  • @sudarshankj
    @sudarshankj 3 ปีที่แล้ว +18

    Great tutorial. Pure content and no nonsense. Loved it! KEep up the great work.

  • @adityakulkarni2764
    @adityakulkarni2764 ปีที่แล้ว +3

    I don't find any other word, It's just PERFECT; the video, it has exactly everything that I wanted to know. Thanks a lot! Peace

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

    Great video! Super helpful. Would love to see a video where you connect to an external database such as Postgres or Mongo using the firebase user

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

    Thank you so much. You made this so easy in 2023 :)

  • @deuryferreira5291
    @deuryferreira5291 5 หลายเดือนก่อน +1

    Just what i was looking for, tank you!

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

    i've been searching for DAYS how to decode a jwt using firebase I nothing was working, I read the docs several times I nothing worked, but this tutorial solved my problem. Thank u so much!
    wtf, I am dumb or the docs are not that good?

  • @preciousaffiah8603
    @preciousaffiah8603 6 หลายเดือนก่อน

    Thanks so much, the simplest tutorial I’ve come across for firebase auth

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

    Thanks for your video. There is just some issue with the new updates of firebase that break the imports, but its easy to fix ^^

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

    Hey brother! Thank you for posting such a nice and straight forward tutorial.

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

    It was very helpful, good work!

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

    Actually I have a question on this...How to host this project finally to firebase including both server and frontend

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

      Well there 2 ways that you can do:
      1. You can deploy both of server and frontend together by wrap both of it inside docker compose and deploy it with any cloud provider that support docker.
      2. You can deploy separately:
      - Frontend: deploy with Firebase or any other support platform
      - Backend: deploy with Google cloud or digital ocean or any other support platforms.
      After that you can use library like axios to communicate between front to back.
      Finally if you just want to do something like a demo deploy frontend with Firebase and backend with heroku because both of these are free depending on your use case.
      Hopefully this can help. Happy coding

    • @VetrivelRavi
      @VetrivelRavi 2 ปีที่แล้ว

      @@DailyWebCoding is there any way to deploy both on firebase itself

    • @VetrivelRavi
      @VetrivelRavi 2 ปีที่แล้ว

      And when I tried to do res.headers.authorization.split() its throwing error as undefined I’m not sure why thats hapening but the token everything is pssed perfectly

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

    Great tutorial thank you so much, very clear just what I was looking!

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

    Great video man, helped me a lot. Thank you!

  • @RajivKumar-kn6sk
    @RajivKumar-kn6sk 3 ปีที่แล้ว +1

    clean video --- did exactly what was intent... thanks bro

  • @mkhululicebani6977
    @mkhululicebani6977 2 ปีที่แล้ว

    Very clear, precise, informative video. Saved my app, thank you😉

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

    Oh, really nice
    Now what if I wanted to use the backend to make requests to firebase so that I could get the data I want? Can I use the same credentials I get?

  • @cleandust530
    @cleandust530 2 ปีที่แล้ว

    thanks lot. When that day comes, you will definitely go to heaven.

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

    Thanks a lot for this video 👍❤️ At 26:49, can we put service account key json file in gitignore? At the time of deployment/hosting, do we need to change its configuration?

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

    This helped me today, thank you!

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

    Hello, great video. I've read a lot about the security issues that come with setting up firebase on your front end. Is there something I am missing here, why is the firebase-config login on the front end. Shouldn't this be in your express files?
    I am sorry if this is a dumb question, I am seriously struggling with this concept.

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

      Exactly, anyone can view the apikey by inspecting the page so the firebase configuration should not be in the Front-End what else can we do for this?

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

      @@yusufn8268 couldn'r we just pass the authorization to the backend, with a login route? or use cookies in the frontend via ssr to hold the credentias instead

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

      My doubt exactly. And if we have a backend, why don't transfer the login and register logic there? Is it safe keeping your firebase config in frontend?

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

    Still useful big thanks!!!

  • @akshanshshrivastava2959
    @akshanshshrivastava2959 2 ปีที่แล้ว

    Thanks for the simple and upto the point explaination :)

  • @Giburozu
    @Giburozu 8 หลายเดือนก่อน +1

    Sir, i'm a newbie programmer and i have some questions, can i use firebase just for auth, and for crud other data i use other database like mysql?
    Thank you sir, i hope you answer me🙌🙌

    • @DailyWebCoding
      @DailyWebCoding  8 หลายเดือนก่อน

      Yes, you can

    • @Giburozu
      @Giburozu 8 หลายเดือนก่อน

      Thanks, sir

  • @cempakajanuari5983
    @cempakajanuari5983 2 ปีที่แล้ว

    This is what I need. Thanks man. But why should we added Bearer? whereas we will remove it on server? What is the use of Bearer? Btw, it's a great tutor.

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

    Thank u very much i like this section

  • @bakunyaa
    @bakunyaa 2 ปีที่แล้ว

    It's great video and very helpful. Thanks man!

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

    Thank you - really helpful!

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

    Excellent!! Kipe it like that

  • @cryptoheist469
    @cryptoheist469 2 ปีที่แล้ว

    Would that work with calls to a MongoDB instead of a plain json object when calling app.get('/api/todos')?

  • @daffahanz1540
    @daffahanz1540 2 ปีที่แล้ว

    great tutorial! this is helpful for my project, thanks!!!

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

    Awesome

  • @nuvola-b
    @nuvola-b 5 หลายเดือนก่อน

    You shouldnt store token in an app state. you should get it on every request

  • @aliciaulin9332
    @aliciaulin9332 2 ปีที่แล้ว

    Thanks! This was really helpful!

  • @xyz-ey7ul
    @xyz-ey7ul 3 ปีที่แล้ว +1

    how come importing firebase from 'firbase/app' in app.js file works? i thought you would import from your 'firebase-config.js' file since it's the one you initialized.

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

      It initialize globally throughout your app

  • @sitadabo4607
    @sitadabo4607 8 หลายเดือนก่อน +1

    Thanks for this

  • @tharinduakalanka6857
    @tharinduakalanka6857 3 ปีที่แล้ว

    I am having an error "FirebaseAuthError: Firebase ID token has incorrect "aud" (audience) claim."

  • @errinwright
    @errinwright 2 ปีที่แล้ว

    How come you used Express and Axios?? why not Express for both??

  • @binwelbeck1482
    @binwelbeck1482 2 ปีที่แล้ว

    It was Great video and very helpful content , thanks

  • @thongtranlequoc688
    @thongtranlequoc688 2 ปีที่แล้ว

    This so good thank u my friend!!

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

    so cool tutorial, thank you sir!

  • @brainzdesignz
    @brainzdesignz 3 ปีที่แล้ว

    Well received! Thank you.

  • @es_pythondevelop7981
    @es_pythondevelop7981 3 ปีที่แล้ว

    great work bro keep going

  • @mahmoudabdelazem2244
    @mahmoudabdelazem2244 3 ปีที่แล้ว

    very nice, excellent work thanks bro

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

    awesome. it's save my time or complexity

  • @okbrk
    @okbrk 3 ปีที่แล้ว

    The error you get on the console is that you are using a brave browser, which blocks third-party trackers by default. That's why.

    • @Mattdokn
      @Mattdokn 2 ปีที่แล้ว

      Just to add to this, the fix is to turn off shields for the site

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

    Great!, thank you

  • @yoelczalas
    @yoelczalas 2 ปีที่แล้ว

    Very useful! thank very much

  • @abdelrahmanmohammed9405
    @abdelrahmanmohammed9405 3 ปีที่แล้ว

    Thank you for this video!

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

    U made my day

  • @maskman4821
    @maskman4821 2 ปีที่แล้ว

    Very useful tutoial 👍

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

    Awesome Video ++++++++++++++++++++ Thank you

  • @effset
    @effset 3 ปีที่แล้ว

    Thanks ! Great tuto !

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

    great, direct to the point, no BS

  • @gabrielfernandoalicuchallo6363
    @gabrielfernandoalicuchallo6363 2 ปีที่แล้ว

    with version 9 change all type:
    import firebase from "firebase/app";
    import "firebase/analytics";
    by
    import firebase from "firebase/compat/app";
    import "firebase/compat/analytics";
    libre de errores en la consola.

  • @ookam6371
    @ookam6371 3 ปีที่แล้ว

    Thanks a lot. This helps me a lot

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

    The error you have at 4.30 is most probably due to injection of Google analytics account - Stop that and the error will go

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

    Thank you so much

  • @josh-richards
    @josh-richards 3 ปีที่แล้ว

    thanks heaps man, this is great!

  • @KHANGNGUYENDUY-bx1cq
    @KHANGNGUYENDUY-bx1cq 3 ปีที่แล้ว +1

    I have a question when firebase refreshes the token (1 hour), does the above source code work? Thank u very much!

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

      I think it won't unless you refresh the app

  • @dindoleonard
    @dindoleonard 3 ปีที่แล้ว

    Brother! may I know your VScode theme?

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

    The Error was showing in console is because of your browser extensions!

  • @muhammadnurrahman813
    @muhammadnurrahman813 2 ปีที่แล้ว

    best tutorial

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

    Thnks!

  • @Dave-dl8ey
    @Dave-dl8ey 2 ปีที่แล้ว

    This was really a great video. I hope you continue to do more! :)

  • @byteslinger3187
    @byteslinger3187 2 ปีที่แล้ว

    good shit m8

  • @vOnez212
    @vOnez212 3 ปีที่แล้ว

    Perfect!

  • @FreeMarketSwine
    @FreeMarketSwine 3 ปีที่แล้ว

    Very nice tutorial

  • @danielalbert6834
    @danielalbert6834 2 ปีที่แล้ว

    Thanks!

  • @googleaccount2385
    @googleaccount2385 3 ปีที่แล้ว

    Thank you very much

  • @martinvalenzuelamagallanes640
    @martinvalenzuelamagallanes640 2 ปีที่แล้ว

    Good content, just what I needed in my project. Thanks!

  • @harshanarayan7363
    @harshanarayan7363 3 ปีที่แล้ว

    Nice tutorial

  • @kyledaines2428
    @kyledaines2428 2 ปีที่แล้ว

    Incredible, exactly what I needed.

  • @erlich8414
    @erlich8414 2 ปีที่แล้ว

    Great

  • @herbertk9266
    @herbertk9266 3 ปีที่แล้ว

    Thank you

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

    For what shall it profit a man, if he shall gain the whole world, and lose his own soul? Or what shall a man give in exchange for his soul?
    Whosoever believeth in Jesus Christ should not perish, but have everlasting life.

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

    Thank you, very helpful 😊

  • @yanbabitski2777
    @yanbabitski2777 2 ปีที่แล้ว

    Thanks!