Vue 3 + Firebase Authentication in 10 Minutes

Sdílet
Vložit
  • čas přidán 7. 09. 2024
  • ✅ FREE VUE 3 CHEATSHEET WITH ESSENTIAL CODE SNIPPETS
    learnvue.co/vu...
    follow me on twitter:
    / mattmaribojoc
    🚨 Like quick Vue lessons like these? Check out 800+ lessons over on Vue School - go.learnvue.co...
    INTRO
    Music by Lukrembo

Komentáře • 118

  • @brunosargi7012
    @brunosargi7012 Před 2 lety +38

    I really just want to say "THANK YOU" for this amazing content. I used React for years and now decided to switch for Vue, and your channel is making my experience from "nice" to "omg I love Vue". So really thanks and please keep up with the amazing content!!

    • @miraztisha
      @miraztisha Před 2 lety

      Can you give me source code??

  • @JimKrillPDX
    @JimKrillPDX Před rokem +2

    I wrestled with how to handle the authGuard in vue-router for a while... finally ended up with something similar to what you have here, but not quite. This video helped out a lot to finalize what I've been working on. Thank you!

  • @hyggedev2124
    @hyggedev2124 Před 2 lety +1

    I was today years old, when I found out, I can understand a lot of what's happening in vue coming from React. When your learn web development framework's, there truly is so much overlap and similarities 💯 Great video. I think vue is next for me.

  • @luistrcastro
    @luistrcastro Před 2 lety +5

    One of the best tutorials ever!! New, updated and straightforward

  • @nevenlukic
    @nevenlukic Před rokem +3

    7:27 has saved me. Thank you! I've managed to setup everything myself but this part was the missing piece. Great video, short, informative and fun.

  • @RumbleLab
    @RumbleLab Před 2 lety +2

    I don't normally like and subscribe to videos like this but you were an exception. Your style was really nice and concise. I could see me watching your videos not just when I am trying to do something, but when trying to learn a new concept. Fine job. Thank you

    • @LearnVue
      @LearnVue  Před rokem +3

      thanks so much i really try to make videos that respect everyone's time, so i'm glad you like the style :)

  • @shaxzodalimov356
    @shaxzodalimov356 Před rokem +2

    I haven't been able to find such quality content on this topic for a long time. It was very useful. Thank you

  • @danielwatson6529
    @danielwatson6529 Před 2 lety +1

    Thanks bro, would love more firebase(9) stuff, love how u present it, the pace etc

  • @luisangelguzman2335
    @luisangelguzman2335 Před 2 lety +2

    Simple, concise, and streightforward. I have nothing to say but thank you. Keep up the amazing content!

  • @youssefelshahawy8080
    @youssefelshahawy8080 Před 2 lety +6

    Such an amazing tutorial, man!
    Keep going

  • @pushandhabalia1501
    @pushandhabalia1501 Před 2 lety

    you were super quick, super precise, covered all cases. Its hard to find guys like you. Keep up the pacy work, Simple awesome thanks man 🍻

  • @patrickodonnell2010
    @patrickodonnell2010 Před rokem

    This is a great concise example! I adapted it to my Vuetify 3 project and the options format and it worked 1st time. Thanks for this, brilliant, and btw I was making it much more difficult for myself prior to watching this lol.

  • @ignjat4123
    @ignjat4123 Před rokem +1

    This video explains everything so well in just 10 minutes. Thanks a lot for the video, man. You saved me a ton of time.

  • @HijadeOdin
    @HijadeOdin Před 6 měsíci

    Excellent! first time I watch a QUICK guide for development and it actually works haha! Thank you, this is very usefull

  • @funkdoc94
    @funkdoc94 Před 2 měsíci

    Great video, thank you.
    One note though: never tell the user "wrong password" or "wrong username", this is a security threat.

  • @atherisu4842
    @atherisu4842 Před rokem

    Thank you so much for this video!!!
    I think a role based access control with firebase would be a great continuation to this

  • @deadlyprogrammer6780
    @deadlyprogrammer6780 Před 5 měsíci

    thanks for the toturial! hope you come back publishing more videos ^^

  • @Rasmuskvejborg
    @Rasmuskvejborg Před 9 měsíci

    Thank you for this excellent guide that is not a second longer than it needs to be!

  • @ReshiMahendra
    @ReshiMahendra Před 2 lety +1

    Nice tuts.. waiting for the oauth signin/signup with local database instead of firebase 😁👍

    • @LearnVue
      @LearnVue  Před 2 lety +1

      Thanks, I'll look into making one!

  • @AryanChaurasia10
    @AryanChaurasia10 Před 2 lety +3

    Nice but if you could also show documentations steps it will be lot easier to learn for new comers. Like going through the documentation of Firebase showing users how you got the method and then using in your code.

    • @Shulkerkiste
      @Shulkerkiste Před rokem +1

      The Firebase authentication documentation is really confusing. It wouldn't help for this video.

  • @wimdenherder
    @wimdenherder Před rokem

    Fantastic tutorial. If you look to LIKES / VIEWS, it seems that video's with a ratio like this video are really high quality

    • @wimdenherder
      @wimdenherder Před rokem

      You can adjust Elliot Waites' chrome extension to this rating-system, enjoy!

  • @ashwinsaxena1437
    @ashwinsaxena1437 Před 2 lety +1

    Thanks for the tutorial! Nicely paced, some Fireship influence here, am I right?

  • @codexjay674
    @codexjay674 Před rokem

    Thank you so much for this video. i just started Vue and this is just what I needed 👍

  • @lerne-du
    @lerne-du Před 10 měsíci

    Thank you! It is the best video about Vue 3 and Firebase Authentication

  • @KayNaude
    @KayNaude Před rokem

    Very helpful and straight to the point. Everything worked as it should. Thanks

  • @maskman4821
    @maskman4821 Před 2 lety +2

    This is very useful and practical vue ÷ firebase auth tutorial, we can use this as a template, thank you so much. Can you also make a vue + firebase token auth with express or nuxt tutorial, I really want to know how to implement token auth with firebase javascript/admin sdk, thank you in advance 🙏🙏🙏

    • @LearnVue
      @LearnVue  Před 2 lety +1

      thanks!! i'll definitely look into the token auth capabilities. actually looking into something like that for the development of learnvue.co right now!

  • @velhoguidsd
    @velhoguidsd Před rokem

    Simple and perfect example.

  • @JohannGarrido
    @JohannGarrido Před 2 lety

    Man, this video is just GOLD. Subscribed.

  • @ridwanridiawan
    @ridwanridiawan Před rokem +1

    Hi terimakasih, saya pelanggan baru anda ,,👍🏻

  • @domb7210
    @domb7210 Před 2 lety +3

    Can someone explain to me the getCurrentUser function and the removeListener callback in 7:42?
    I do not understand why removeListener is called inside itself.
    I also tried not calling removeListener inside itself, and it works the same. What is the difference?
    Thank you!

    • @web3388
      @web3388 Před 2 lety

      calling removeListener again cancels the tracking of onAuthStateChanged. Let me explain with an example, onAuthStateChanged solved the problem of the lack of authorization status when the page was refreshed. Those. we waited for this event and received an authorized user. If tracking is not canceled, then onAuthStateChanged will fire on every route change, in general this will not affect the work in any way, but in fact we only needed it once - on reboot. I hope I managed to explain))

    • @wimdenherder
      @wimdenherder Před rokem

      I tried to make it shorter, but actually the listener persists, so it's 'still detecting' multiple times when logging out and in again. But still, not really a performance issue ;)
      const getCurrentUser = () =>
      new Promise((resolve, reject) => {
      onAuthStateChanged(getAuth(), e => {
      console.log('still detecting');
      resolve(e);
      }, reject)
      }
      )
      So you could also write this, which is easier to read:
      const getCurrentUser = () =>
      new Promise((resolve, reject) => {
      onAuthStateChanged(getAuth(), resolve, reject)
      }
      )

  • @mj-lc9db
    @mj-lc9db Před 2 lety

    Yoooo! Thanks this helped me for my school work

  • @radekhladik7895
    @radekhladik7895 Před 2 lety

    There is one thing that should have been noted in the video. The route guard is client side so it must not be considered secure on its own. It is more like a convenience for the user than real barrier.... You need to implement proper guards in your backend.

    • @LearnVue
      @LearnVue  Před 2 lety

      yeah definitely - adding some auth checks to the API calls is always necessary!

  • @juanalbertoboada
    @juanalbertoboada Před 2 lety

    WOW! Amazing tutorial! simple and streightforward!
    Two thumbs up!

  • @RicardoMouraGimenez
    @RicardoMouraGimenez Před 2 lety

    Best tutorial on youtube. Thank you!

  • @tamtm-gp9nr
    @tamtm-gp9nr Před 2 měsíci

    thank you for this amazing content

  • @sanusivictorolajuwon514
    @sanusivictorolajuwon514 Před 2 lety +1

    Great tutorial 🤗🤗🤗. Thank You 👍🏽

  • @lowkeygaming4716
    @lowkeygaming4716 Před 2 lety

    Very nice vid. You have discussed a lot of useful stuff in a short time.

  • @user-kx9mb9fk7i
    @user-kx9mb9fk7i Před 10 měsíci

    you are the best, love you man

  • @martijn_schermers
    @martijn_schermers Před 2 lety

    Big love, you solved a problem I was dealing with for tooo long 🤟

  • @Skif769
    @Skif769 Před 2 lety

    Thank you! Very help me add fairebase in prj

  • @GabrielAlves-rs6eq
    @GabrielAlves-rs6eq Před 3 dny

    great video!

  • @shayonghoshroy7208
    @shayonghoshroy7208 Před 2 lety

    Great tutorial! Really helped me a lot. Only comment, please provide source code in the description.

  • @zergzerg4844
    @zergzerg4844 Před rokem

    In your lesson you've made a mistake when you initialized firebase on 2:20. According firebase's manual if you are going to use Auth config you need to pass app into getAuth method =>
    const app = initializeApp(firebaseConfig);
    // Initialize Firebase Authentication and get a reference to the service
    const auth = getAuth(app);
    And after then using this variables.

  • @TylerPotts
    @TylerPotts Před 2 lety +1

    Hey! Great tutorial! I love the pacing! :D

    • @LearnVue
      @LearnVue  Před 2 lety +2

      thanks a ton. been a fan of your videos too!!

    • @TylerPotts
      @TylerPotts Před 2 lety

      @@LearnVue Haha, thank you! :D

  • @LeagueOfAI711
    @LeagueOfAI711 Před 2 lety

    Good tutorial, could you make a Firestore video please?

  • @aasmundnrsett8751
    @aasmundnrsett8751 Před rokem

    Really smooth 👌🏻

  • @SULAIMANADAMU-wp8fj
    @SULAIMANADAMU-wp8fj Před 10 měsíci

    I love this video, please what's the name of the vs-code theme?

  • @warrenprezydent2010
    @warrenprezydent2010 Před rokem

    Really good video. With yours help, firebase doesn't look that hard :D

  • @alexanderpooh4015
    @alexanderpooh4015 Před 2 lety

    Thank you! You really helped me! Thanks god I learnt English!

  • @chase5998
    @chase5998 Před rokem

    Hi there, thanks for the tutorial.
    Unfortunately, though the google popup sign in works on desktop web, for some reason when i'm on iphone safari, when i tap on the sign in with google option button, the popup appears for half a second then disappears. I've tried safari, chrome and brave and all faced the same issues. It works normally when i'm on my desktop though. Anyone else faced a similar issue?

  • @closeluca
    @closeluca Před 2 lety +1

    thanks dude, this is a very nice tutorial!

    • @LearnVue
      @LearnVue  Před 2 lety +1

      thank you thank you! and thanks for the support on so many of my vids!

  • @emburaman
    @emburaman Před 2 lety

    Great tutorial.
    Now, anyone also getting "error 'handleSignOut' is assigned a value but never used" ? How to solve that?

  • @varavinth5196
    @varavinth5196 Před 2 lety

    Great tutorial.. And very useful..

  • @tobiasfriedrich00
    @tobiasfriedrich00 Před 2 lety

    Wow! Amazing Video!!! Thank you!

  • @lhceleguim
    @lhceleguim Před 2 lety

    simply fantastic

  • @teosean_9647
    @teosean_9647 Před rokem +1

    I have an error property 'email' and 'password' was accessed during render but not defined on instance, do u know how to fix it?

  • @gcfhornet
    @gcfhornet Před rokem

    Really helps. Thanks.

  • @tomaszleszczynski8928

    Hi Matt. First of all, thanks for the tutorial. The content you provided is really helpful. I followed your instructions, but I'm stuck with logging out when the user closes the browser tab. Any advice?

  • @NoleKsum-si6vg
    @NoleKsum-si6vg Před rokem

    You helped me so much

  • @comunicloud30
    @comunicloud30 Před 2 lety

    You rock!!!! Thank you very much for this video.

  • @rucibi
    @rucibi Před rokem

    wonderful ! Thanks !!

  • @SunilVGandhi
    @SunilVGandhi Před 2 lety +1

    Is there a repo where I can check out the code ?

  • @MohamedGamal-hd7rc
    @MohamedGamal-hd7rc Před rokem

    PLEASE 🙏 🙏 Can someone tell me i make this auth how i can use laravel as a backend and make relationships with user

  • @malathip4043
    @malathip4043 Před 2 lety

    I want to use .net core mssql for backend, what is the auth plugin to use with vue

  • @jonathanesedji8705
    @jonathanesedji8705 Před rokem

    ty es un manstrr le sang !

  • @caiovinicius7871
    @caiovinicius7871 Před 2 lety

    Amazing video, ty!

    • @LearnVue
      @LearnVue  Před 2 lety +1

      thanks for the support 💚

  • @damianperez7736
    @damianperez7736 Před 2 lety +1

    Can someone explain to me what is happening in 7:41 ? Why is removeListener calling to itself?

    • @hashira_d
      @hashira_d Před 8 měsíci

      because onAuthStateChanged return unsubscribe method before further code execution

  • @riyad-appscode
    @riyad-appscode Před 2 lety

    awesome video

  • @danielwatson6529
    @danielwatson6529 Před 2 lety

    yea go on bro, theres literally nothing on " vue 3 firebase 9 crud with typescript" I've been going round in circles for days I can't find anything but to me it feels like such an obvious stack/system once i can get It operating

  • @Dania-Rahub
    @Dania-Rahub Před rokem

    Amazing !

  • @santokhan_
    @santokhan_ Před rokem

    Great

  • @medamazigh
    @medamazigh Před 2 lety

    THANK YOU SO MUCH

  • @franzieerides7306
    @franzieerides7306 Před 2 lety

    Great tutorial!
    Can anyone help me? I'm getting a "TypeError: next is not a function" in router/index.js

    • @Shulkerkiste
      @Shulkerkiste Před rokem

      It should look something like this:
      router.beforeEach(async (to, from, next) => {
      const routeRequiresAuth = to.matched.some(record => record?.meta.requiresAuth);
      await isLoggedIn() || !routeRequiresAuth ? next() : next({ name: 'login' });
      });

  • @YuvrajSingh-sm1rc
    @YuvrajSingh-sm1rc Před rokem

    but where did you added client secret and id

  • @mahtoosacks
    @mahtoosacks Před rokem

    Why does my app keep making the homepage default to /#? All my routes end up being prefixed with /#/

  • @traitotaku4940
    @traitotaku4940 Před rokem

    Awesome Video! 6:49 I get this error: Uncaught FirebaseError: Firebase: Need to provide options, when not being deployed to hosting via source. (app/no-options).
    I noticed that other components are calling getAuth() in onMounted(), how can I fix this error? Please help.

    • @traitotaku4940
      @traitotaku4940 Před rokem

      Sorry it's solved! I was missing the
      else {
      next();
      }

  • @pattlactroi4279
    @pattlactroi4279 Před 2 lety +2

    Can you provide the source code, please! Thank you!

  • @noaah.m
    @noaah.m Před rokem

    my routes arent working to go to the register or sign in page?

  • @brainandrie2874
    @brainandrie2874 Před rokem

    How to validate the error that the email we used has been registered?

  • @deletedaccount-b5o
    @deletedaccount-b5o Před 2 lety

    Why you've deleted "const app = " at 2:18?

  • @moodzc945
    @moodzc945 Před rokem

    how to prevent a logged in user to access the sign in and register?

  • @donggillee6527
    @donggillee6527 Před 2 lety

    luv ya

  • @deavisdude
    @deavisdude Před 2 lety

    Great tutorial, unfortunately when I try to use signInWithPopup or signInWithRedirect I am sent to a blank page...

    • @LearnVue
      @LearnVue  Před 2 lety +1

      Hey! Since releasing this video, there's been a major update to the Firebase SDK. an awesome member of the community updated the Github repo for it, let me know if this helps: github.com/matthewmaribojoc/vue-firebase-auth

    • @deavisdude
      @deavisdude Před 2 lety

      @@LearnVue Thanks for the reply, but it doesn't look like that project uses the google auth provider. I am able to get email and password working. Just not the google auth provider

    • @deavisdude
      @deavisdude Před 2 lety

      @@LearnVue Tried commenting before with a link to my stack overflow post, but it seems like they're being deleted.

  • @69leostereo
    @69leostereo Před 2 lety

    some can share the code for this project ?

  • @zackplauche
    @zackplauche Před rokem

    3:52 There's nothing in my localStorage, and I successfully created an account and "logged in" apparently. 👀

    • @Shulkerkiste
      @Shulkerkiste Před rokem

      I was confused too, when I've tried it the first time ^^
      Firebase stores the user in DevTools -> Application -> IndexedDB.

  • @Busyideas
    @Busyideas Před 2 lety

    Hii can you provide source code please please

  • @HenriqueLeal92
    @HenriqueLeal92 Před 2 lety +1

    I finished it with many errors, all of them "is defined but never used" because i don't know where i was supposed to use.. that's why i watched the video to learn.. nice try but i found it incomplete

  • @parkerboling6361
    @parkerboling6361 Před 2 lety

    i hate this shit..... everytime i follow along with a video something fucks up. why is it saying component names should be multi-word

    • @LearnVue
      @LearnVue  Před 2 lety +2

      hey! i think that might be an issue coming from eslint.vuejs.org/rules/multi-word-component-names.html - let me know if this helps :)

  • @nikolamanojlovic7657
    @nikolamanojlovic7657 Před rokem

    this is too fast, i dont understand what are you doing :/