Google Authentication With React JS & Firebase - Sign In With Google - Firebase v9

  Рет қаралды 55,748

Code Commerce

Code Commerce

Күн бұрын

In this video I demonstrate how to use Google authentication with Firebase using React JS. We will focus on two separate ways to authenticate with Google. (Sign in with a google popup) or (Redirect to Google Page). We will store all of the logic in Context for managing the authenticated state of the user.
Thank you for watching.
Please use your own keys- they are free!
If you are interested in authentication with an email & password then you can view that here!
• React Firebase Authent...
Github Repo:
github.com/fir...
🔥 Connect with me on IG 🔥
/ fireclint
☕ Support the channel ☕
www.buymeacoff...
🔥 My Coding Equipment 🔥
Logitech MX Wireless Keyboard - amzn.to/3xKPFiN
Logitech MX Master 2S Wireless Mouse - amzn.to/3O5WmRD
SAMSUNG 49-Inch Gaming Monitor - amzn.to/3mvUy8M
Shure MV7 USB Podcast Microphone - amzn.to/3O00nqG
Mic Boom Arm - amzn.to/3NHn6YU
Monitor Desk Light Bar - amzn.to/3xzKlyj

Пікірлер: 167
@TangiersIntrigue
@TangiersIntrigue Жыл бұрын
Man, this saved me a major headache. I wanted to implement Firebase on an app that was working with Sanity previously, which was using OAuth. It has been a while since I last worked with Firebase, so not only this was a great refresher but saved me a long time going through documentation. Really appreciate it.
@codecommerce
@codecommerce Жыл бұрын
Thank you my friend
@jezuschrist7120
@jezuschrist7120 8 ай бұрын
Thank you Clint , your videos are awesome , you explain while showing how its done ..Keep the good work going ...👍
@DexterrrrX
@DexterrrrX 2 жыл бұрын
Anytime I need to add authentication to my projects I just come back here You save me everytime😂
@codecommerce
@codecommerce 2 жыл бұрын
Thank you dude! Awesome!
@LetsPlayLuffy
@LetsPlayLuffy Жыл бұрын
Thank you for the tutorial! Just a little feedback; but it would be nice, if the music wasn't so distracting. Use something more relaxing or give us the option to run our own :)
@codecommerce
@codecommerce Жыл бұрын
Thank you Luffy, I’ll find something a little more relaxed.
@Ni3o
@Ni3o Жыл бұрын
I was one video away from pausing Programming for a few weeks, luckily the video was yours. Thx so much, great vid. Have a nice Day.
@codecommerce
@codecommerce Жыл бұрын
So awesome dude. Keep it going 💪
@akarshanmishra2351
@akarshanmishra2351 Жыл бұрын
This has been the first time I never had any issues while following the tutorial. Everything is upto date and clearly explained. Thank you so much for making this tutorial and saving hrs of pain staking stackoverflow and docs browsing.
@AhmadMughal1
@AhmadMughal1 Жыл бұрын
Using this method when i import the logOut and User in the Navbar it causes an error saying intermediate values undefined
@lean9875
@lean9875 Жыл бұрын
The best tutorial, saludos de Argentina! keep doing this videos pls 🔥🔥🔥🔥
@neilmerchant2796
@neilmerchant2796 2 жыл бұрын
Can I ask what you're listening to around 17:00? sounds like some wave music 🌊
@danarichards1765
@danarichards1765 11 ай бұрын
Is there anyway to change the project name after "to continue to" ?
@aaaliii4u
@aaaliii4u Жыл бұрын
always concise and to the point, aweome video. (y)
@codecommerce
@codecommerce Жыл бұрын
Thank you my friend!
@fabioaurora
@fabioaurora Жыл бұрын
Great explanation, but this is not working for me atm because CORS is blocking the Popup, is there a workaround this?, cant find it anywhere, seems that a lot of people having the same problem using google Authentication with Firebase at this moment
@codecommerce
@codecommerce Жыл бұрын
CORS can be a little tricky and is certainly annoying!
@bravo1oh1
@bravo1oh1 2 жыл бұрын
Yo man.. i got the apple log in to work! .. feels great.. quick question.. why does the protected route show for a split second. how do u not have that happen.. ive searched google but no one talks about it? did we do something wrong?
@carminameza
@carminameza 2 жыл бұрын
Amazing video, the goat
@codecommerce
@codecommerce 2 жыл бұрын
Thank you CP! 🙏
@martinthomas8955
@martinthomas8955 Жыл бұрын
I'm using signInWithRedirect and testing it out on the server with my iPhone and my dad's Samsung phone and neither of them can login. When I hit the google button it just does nothing. This works exactly how it is in the video on my desktop but just not on mobile phones. Any ideas anyone? Also I have downloaded your version from github and tried it, same issue unfortunately Update: just added my ip address to the Authorized domains in Firebase and it works now. However after signing in with google, when it redirects me back to my page it doesn't sign in as if user is null. Same with github version. Any ideas?
@akshittyagi4068
@akshittyagi4068 Жыл бұрын
Did you got a solution I am also having same issue
@kg_khangelani
@kg_khangelani Жыл бұрын
Thank you🙌
@MANASDEWARIMVCS
@MANASDEWARIMVCS 2 жыл бұрын
super helpful video
@coodementor6826
@coodementor6826 2 жыл бұрын
Thank you alot, Can u make a videos react firebase auth v9 one device is allowed at a time??
@codecommerce
@codecommerce 2 жыл бұрын
Like the user can only be logged in on one device at a time?
@coodementor6826
@coodementor6826 2 жыл бұрын
@@codecommerce Yes sure, example: netflix does
@matheus-felipe-dev
@matheus-felipe-dev 2 жыл бұрын
tanks
@ZweL2001
@ZweL2001 2 жыл бұрын
signInWithPopup not woking on mobile.how to fixed it sir
@codecommerce
@codecommerce 2 жыл бұрын
Hmm do you have a gh?
@not.a.n
@not.a.n 2 жыл бұрын
When a Website using React + headless CMS?
@codecommerce
@codecommerce 2 жыл бұрын
That would be awesome!
@Ash-ko8qp
@Ash-ko8qp Жыл бұрын
I loved your video. But may I suggest not using the music in the background, we are way too interested in what you're speaking.
@ashmitsharma9096
@ashmitsharma9096 Жыл бұрын
Please don't add bg music. It is VERY distracting.
@sumeetsuryawanshi8384
@sumeetsuryawanshi8384 6 ай бұрын
Smashed the like button so hard it might have broke my screen!😐 Thank you for this amazing guide
@codecommerce
@codecommerce 5 ай бұрын
Haha thanks man!
@NagatoKamiPain
@NagatoKamiPain Жыл бұрын
please dont use background music in explanation videos its disturbing and deconcentrating, but great video otherwise
@codecommerce
@codecommerce Жыл бұрын
Thank's GG
@brendansullivan4872
@brendansullivan4872 10 күн бұрын
Problem is that you will get hacked with this approach. You have the file which will show up in the build when deploying this app. By hitting inspect you will see it in the sources and the directory of the build since the values will be hard coded there
@dharmeshgohil9375
@dharmeshgohil9375 2 жыл бұрын
waiting for gmail,facebook and instagram login using react tutorial
@codecommerce
@codecommerce 2 жыл бұрын
You got it dude!
@dharmeshgohil9375
@dharmeshgohil9375 2 жыл бұрын
thank you
@sergiohernandez72
@sergiohernandez72 6 ай бұрын
Great video 👍made it a little more challenging since I was using typescript while following this and it kept giving me type errors. Chat gpt helped me fix those errors but if you have any advice on how I can fix typescript errors when working in javascript that would be great.
@GabrielPereira-hd8tc
@GabrielPereira-hd8tc 5 ай бұрын
Nice man, thanks for this tutorial, the difference to me is that i using the redux and this tutorial helped me to make enjoy your exemples
@Selieznov
@Selieznov Ай бұрын
only for me method with redirect dont work? Btw did someone tested method with popup on mobile browser? works from second time
@PRITPAL1999
@PRITPAL1999 Жыл бұрын
User hook is set to null again and agian, whenever i click on login button, for some second its showing account page, then immediately hook set to null, why this is happening?
@bravo1oh1
@bravo1oh1 2 жыл бұрын
Hi.. awesome video.. havent completed it yet but its turning out great.. quick question - do u have one where you integrate apple log in? what if i want google and apple login on the same application? Also once user logs in.. what if i want them to input data to a table using firestore, can it use the same log in? thanks..sorry im a newb!
@dddoes9528
@dddoes9528 Жыл бұрын
HI sir great video can anyone help actually i made todo app and learning for authentication can you suggest how to display todo of particular user from firebase as i am a newbie
@chrisskyr623
@chrisskyr623 Жыл бұрын
For me does not work and say that hooks can only be called inside of the body of a function. Do you know to fix that issue??
@rakaa31
@rakaa31 Жыл бұрын
one request, please dont use background music
@codecommerce
@codecommerce Жыл бұрын
Thank you Rakaa, was it overpowering?
@TheAppliancePlug
@TheAppliancePlug Жыл бұрын
does this work in NextJS? I know they have their own as well
@codecommerce
@codecommerce Жыл бұрын
Yes it does, you can also use “NextAuth”
@fjj813
@fjj813 2 жыл бұрын
🙏🏼🙏🏼your videos are very helpful😊. can you add more features on that firebase video or start a new reactjs CRUD application (login + register + CRUD)
@codecommerce
@codecommerce 2 жыл бұрын
Thank you dude! Yes, I am working on a project with Firebase Auth coupled with firestore db.
@fjj813
@fjj813 2 жыл бұрын
@@codecommerce 🙏🏼🙏🏼🙏🏼
@abdullahsohail1781
@abdullahsohail1781 4 ай бұрын
why likes are so low, thannnnnnnnnnnnnnnnnnnnnnnnnnkkkkk yoooooooooooooooooooooooooou. Just saved me.
@abdullahsohail1781
@abdullahsohail1781 4 ай бұрын
just subscribed
@abdullahsohail1781
@abdullahsohail1781 4 ай бұрын
just subscribed
@codecommerce
@codecommerce 4 ай бұрын
Appreciate you dude!
@_moonxd667
@_moonxd667 5 ай бұрын
Thank you a lot! You just save my college project 🙏
@janmacek346
@janmacek346 Жыл бұрын
Easy to understand and implement to my project :-) Thank you!
@avi12
@avi12 8 ай бұрын
19:15-19:36 That moment when your camera freezes
@liuyan8066
@liuyan8066 Жыл бұрын
Thank you for your video, this is the most understandable tutorial for teaching firebase. I got 4 errors in 21:53, about "Uncaught TypeError: Cannot destructure property 'user' of '(0 , _context_AuthContext__WEBPACK_IMPORTED_MODULE_1__.UserAuth)(...)' as it is undefined. at Navbar (Navbar.jsx:6:1)" all the code is same as you did. I don't know how comes. Thank you.
@liuyan8066
@liuyan8066 Жыл бұрын
figure out
@codecommerce
@codecommerce Жыл бұрын
Good
@acrophobicgoose
@acrophobicgoose Жыл бұрын
@@liuyan8066 hey I've been debugging the same problem for a while now! How did you figure it out?
@liuyan8066
@liuyan8066 Жыл бұрын
@@acrophobicgoose I put out of , made that error. 😛
@Achrafrzz
@Achrafrzz 10 ай бұрын
hey bro , in phone i can't sign up ?? but in computer si ??
@duyhuynhnguyentuan6266
@duyhuynhnguyentuan6266 Жыл бұрын
Man thank you so much for this video. I couldn't fix my Firebase issue and your video just saved hours of my time.
@codecommerce
@codecommerce Жыл бұрын
Glad it helped
@gabrielsuptitz1624
@gabrielsuptitz1624 Жыл бұрын
Very good tutorial, I'm Brazilian and even reading the caption I managed to learn a lot, thank you very much 💯🙂
@jatinghetiya-g1n
@jatinghetiya-g1n 7 ай бұрын
Thanks, was able to do it the first time
@aliwarraich5067
@aliwarraich5067 Жыл бұрын
Thanks for the complete and to-the-point tutorial
@codecommerce
@codecommerce Жыл бұрын
Thank you Ali!
@studying_timelapse
@studying_timelapse Жыл бұрын
I hardly understand English, but it was easy to understand as I followed it one by one. Thank you!
@codecommerce
@codecommerce Жыл бұрын
Thank you my friend!
@pawe7420
@pawe7420 Жыл бұрын
Bro, hope you will keep going with such great tutorials. Thanks a lot!
@codecommerce
@codecommerce Жыл бұрын
Thank you so much dude!
@nicolas____
@nicolas____ Жыл бұрын
Man you saved my file. I needed this so bad - thank you so much
@codecommerce
@codecommerce Жыл бұрын
Glad I could help!
@13_egagofurtriwahana82
@13_egagofurtriwahana82 2 жыл бұрын
fist
@nafisfaiyaz2791
@nafisfaiyaz2791 Жыл бұрын
i have successfully authorized using google, but i want to add import form drive feature. can you please help me
@maplestoryinchinese
@maplestoryinchinese Жыл бұрын
Great Video!
@codecommerce
@codecommerce Жыл бұрын
Thanks!
@Upendar_nani_222
@Upendar_nani_222 Жыл бұрын
Hii dude i try this code in codesandbox but I got error in Authcaontext The error is 'return outside the function ' how to solve this error please help me
@devashish-soni
@devashish-soni Жыл бұрын
Great Tutorial , easy to understand. I had no problems implementing this in my App. Thanks!
@benjamincabalona9014
@benjamincabalona9014 11 ай бұрын
Earned my sub. It’s exactly what i needed. Than you
@Triwizard109
@Triwizard109 Жыл бұрын
hey Clint, when I do this I get an error auth/operation is not allowed. Can you help me??
@samsuriahmad2128
@samsuriahmad2128 Жыл бұрын
I cant try in next js bruhh
@jltg34
@jltg34 11 ай бұрын
Between all the conflicting and out of date information, I've been stuck trying to learn authentication using Firebase for literally months. You've helped me to finally start getting a handle on it. Thank you, sincerely.
@thecowmilk4857
@thecowmilk4857 2 жыл бұрын
Bro this was one hell of a fire tutorial!!! The guide was splendid, pretty much straightforward and very easy to understand!!! Thank You!!
@codecommerce
@codecommerce 2 жыл бұрын
Thank you my friend!
@samuelerbo
@samuelerbo 9 ай бұрын
Thanks a lot!!!!
@laila-tul-noorahmed5336
@laila-tul-noorahmed5336 2 жыл бұрын
this video is helpful for me thanks for this video
@codecommerce
@codecommerce 2 жыл бұрын
Glad it helped - thank you!
@habeebullahokunlola8154
@habeebullahokunlola8154 6 ай бұрын
Best 🎉
@mahdihossen9526
@mahdihossen9526 Жыл бұрын
thank you
@bydroro5251
@bydroro5251 2 жыл бұрын
wow, i love this video, it's helpful with my project. Thanks a lot
@liuyan8066
@liuyan8066 Жыл бұрын
Hi if possible, could put a tutorial video about after gmail account login in, how to connect with firestore. I repeated Crpyto tutorial to build email login and connect firebase, then I put a google login button in SignIn page. How can make two login methods working for same collection in firestore.
@codecommerce
@codecommerce Жыл бұрын
Ah I see, that would get a little tricky.
@mihirlakhamje9575
@mihirlakhamje9575 9 ай бұрын
you look like Hank Schrader :)
@codecommerce
@codecommerce 8 ай бұрын
lol the bald guy from breaking bad? I'm not sure how i feel about that! hahaha
@sza619
@sza619 Жыл бұрын
Thank you so much!! Amazing tutorial!
@wendeldev
@wendeldev Жыл бұрын
Incredible ! The only video that helped me with this topic. Thank you !!! +1 sub
@codecommerce
@codecommerce Жыл бұрын
Thanks Wendel
@yusufaltundal3482
@yusufaltundal3482 Жыл бұрын
That was very helpful. Thank you sir.
@babatundetaiwo5184
@babatundetaiwo5184 Жыл бұрын
Much needed. I was looking for this for a big project. Thanks a lot. Funny how a video of a year old is still relevant
@codecommerce
@codecommerce Жыл бұрын
Glad it was helpful!
@ermiyasb1453
@ermiyasb1453 Жыл бұрын
Great tutorial and easy explanation thank you sir
@developedbypy
@developedbypy Жыл бұрын
Whats the music playlist? 😀
@codecommerce
@codecommerce Жыл бұрын
Just some random mix on “epidemic sound”. Never heard of the songs before but was feeling those beats!
@thecno
@thecno Жыл бұрын
Awasome content, Thanks.
@codecommerce
@codecommerce Жыл бұрын
Thank you Fernando
@Simonnava1
@Simonnava1 2 жыл бұрын
how can fix the useEffect warning???
@betterbehappythannot3605
@betterbehappythannot3605 2 жыл бұрын
You look like a college dropout without a beard haha, you are one of the most valuable youtube channels, continue to develop as you do!
@codecommerce
@codecommerce 2 жыл бұрын
Haha perhaps I need to grow that beard back. I actually never went to college!! I went to a trade school and became a firefighter/paramedic.
@faroukayomide5214
@faroukayomide5214 Жыл бұрын
Thank you so much 😇 looking forward to more of this really good explanation
@codecommerce
@codecommerce Жыл бұрын
Thank you Farouk!
@kunjolee9243
@kunjolee9243 2 жыл бұрын
Great video, just a question, what's the name of your vscode theme, as i know is One Dark Pro but when i install that theme is not like yours, it'd be nice if you share with me what's the name of your theme :)
@codecommerce
@codecommerce 2 жыл бұрын
Hey dude! I just recently changed it since that video but I’ll have to check. It was one of the variants of One Dark Pro!
@ergceme
@ergceme Жыл бұрын
thanks mate, It was useful vid to learn basic steps of google login 😊
@codecommerce
@codecommerce Жыл бұрын
Thank you Cem!
@alifhasanshahOfficial
@alifhasanshahOfficial Жыл бұрын
thank you so much man.
@codecommerce
@codecommerce Жыл бұрын
Thank you dude!
@mohamedtarek5183
@mohamedtarek5183 2 жыл бұрын
Why you don't make a full e-commerce project free or paid no problem
@codecommerce
@codecommerce 2 жыл бұрын
Thank you for the motivation Mohamed! I will in time! I am enjoying the process!
@siddhant3852
@siddhant3852 2 жыл бұрын
Great video , saved me a lot of time.
@codecommerce
@codecommerce 2 жыл бұрын
That’s so awesome!
@sixtusonyedibe1619
@sixtusonyedibe1619 2 жыл бұрын
Hi I followed your tutorial but the items in the store gets lost after I refreshed the page.
@codecommerce
@codecommerce 2 жыл бұрын
Do you have a link to a github I can see?
@kavascgjmd5790
@kavascgjmd5790 2 жыл бұрын
Hey is it solved?
@Reverse-sg5rn
@Reverse-sg5rn 2 жыл бұрын
can you do one for facebook? or is it the same logic for all social media authentication?
@codecommerce
@codecommerce 2 жыл бұрын
Reverse- yes, you would need a Facebook developer account to get your keys.
@robinsonzapata1
@robinsonzapata1 Жыл бұрын
Great tutorial! Thank you so much very much appreciated.
@codecommerce
@codecommerce Жыл бұрын
Thanks!
@elguirius521
@elguirius521 2 жыл бұрын
it´s amazing , i feel lucky to have found this channel, txk very much!
@codecommerce
@codecommerce 2 жыл бұрын
Dude thank you for the kind words!
@mzattzila89
@mzattzila89 Жыл бұрын
This is awesome, thank you so much!! So helpful
@codecommerce
@codecommerce Жыл бұрын
Thank you!
@dharmeshgohil9375
@dharmeshgohil9375 2 жыл бұрын
EXPECTING FROM LONG TIME
@javascriptcrafts
@javascriptcrafts Жыл бұрын
Thanks man for the amazing tutorial . ❤❤
@codecommerce
@codecommerce Жыл бұрын
Thank you!
@casparbroekhuizen4854
@casparbroekhuizen4854 2 жыл бұрын
Super helpful video that saved me a lot of time, thank you man
@codecommerce
@codecommerce 2 жыл бұрын
Thank you so much Casper!
@iam_bammy4125
@iam_bammy4125 2 жыл бұрын
Love this one! Very helpful... Thanks alot ❤️
@codecommerce
@codecommerce 2 жыл бұрын
So glad!
@andersbraathen1256
@andersbraathen1256 Жыл бұрын
Great video, thank you!
@codecommerce
@codecommerce Жыл бұрын
Thank you Anders
@rhythm_kumawat
@rhythm_kumawat Жыл бұрын
plzzz dont put songs in background
@codecommerce
@codecommerce Жыл бұрын
You got it
@staymotivated1204
@staymotivated1204 Жыл бұрын
OMG😍😍😍😍 This is premium!
@codecommerce
@codecommerce Жыл бұрын
Thanks dude!
@ricardocarvalho4346
@ricardocarvalho4346 Жыл бұрын
Great video
@codecommerce
@codecommerce Жыл бұрын
Thanks man!
@GenerativeAI786
@GenerativeAI786 2 жыл бұрын
excellent job
@codecommerce
@codecommerce 2 жыл бұрын
Thank you! Cheers!
@HarshSingh-un5kh
@HarshSingh-un5kh Жыл бұрын
Try not to put music in bg
@codecommerce
@codecommerce Жыл бұрын
No more music in the bg :)
@halocano5509
@halocano5509 2 жыл бұрын
Normally I never comment on any coding tutorial I have watched, bu this time I make an exception. This is a very good explanatory crash course regarding Firebase authentication process. I really appreciate your kind work, thank you brother.
@codecommerce
@codecommerce 2 жыл бұрын
Thank you my friend! 🙏
@abdulmomin-yq4mt
@abdulmomin-yq4mt Жыл бұрын
@codecommerce
@codecommerce Жыл бұрын
Whats up man!
@rungxanh2901
@rungxanh2901 Жыл бұрын
Thank you very much Boss 🫡
@codecommerce
@codecommerce Жыл бұрын
Thanks Joe!
Next.js Authentication Firebase - Sign in with Google
36:54
Code Commerce
Рет қаралды 41 М.
An Unknown Ending💪
00:49
ISSEI / いっせい
Рет қаралды 56 МЛН
Остановили аттракцион из-за дочки!
00:42
Victoria Portfolio
Рет қаралды 3,7 МЛН
Setting Up Google Authentication in Firebase 9: A Step-by-Step Guide
15:08
Brett Westwood - Software Engineer
Рет қаралды 17 М.
User Authentication with React & Firebase: Full Tutorial
1:03:35
Daweb Schools • Learn to code today!
Рет қаралды 11 М.
React Authentication Crash Course With Firebase And Routing
56:00
Web Dev Simplified
Рет қаралды 654 М.
Google Identity Services Login with React (2023 React Google Login)
19:50
Add Auth to your React Project EASILY Tutorial
52:47
developedbyed
Рет қаралды 59 М.
React Todo App With Firebase v9 / CRUD Functionality
58:16
Code Commerce
Рет қаралды 51 М.