React Social Login with Passport.js | React oAuth w/ Google, Facebook, Github

React Social Login with Passport.js | React oAuth w/ Google, Facebook, Github

Lama Dev

2 года назад

163,279 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

HYPER GAMING
HYPER GAMING - 09.11.2023 18:45

@LamaDev Is it still relevent and worthy to use this method in November 2023, sir??

Ответить
Aristos Xanthus
Aristos Xanthus - 22.10.2023 04:25

I'm getting the following error when using passport-google-auth20: TypeError: OAuth2 is not a constructor. It's weird because Lama's repo works fine but mine doesn't even though I have the same versions and everything.

Ответить
Fred Code
Fred Code - 18.10.2023 09:41

anyone having issues with set-cookies in the browser ?

Ответить
Aman Choudhary
Aman Choudhary - 06.10.2023 21:59

Login sessions require session support. Did you forget to use `express-session` middleware?
getting this error please help

Ответить
trong anh nguyen thanh
trong anh nguyen thanh - 29.09.2023 07:16

I don't really understand why do we create a google login route with a get not a post method ?

Ответить
JENO BELLIDO
JENO BELLIDO - 20.09.2023 13:27

TypeError: req.session.regenerate is not a function

Ответить
Nadhiful Alim
Nadhiful Alim - 15.09.2023 09:05

thank you very much for sharing

Ответить
SUPRATIK SARKAR
SUPRATIK SARKAR - 09.09.2023 05:35

passportSetup is not required in index.js and still why have you written i dont know. its not in passport.js though but you have imported it inside index.js . WTF dude.

Ответить
Arun Lazar
Arun Lazar - 03.09.2023 10:57

In my case req.user is always undefined 😐

Ответить
saurabh talele
saurabh talele - 01.09.2023 18:39

Great, working locally,
But deployed then its not working checked everything.can i set cookies once authentication happens...

Ответить
Tiago Blauth
Tiago Blauth - 25.08.2023 14:32

Many thanks for the course. Really like it.

Ответить
yorozuya
yorozuya - 22.08.2023 20:12

Is recommended to use a jwt once the user has logged with any social media?

Ответить
namirah rasul
namirah rasul - 21.08.2023 19:37

If I want to do this without react how do I do it?😊

Ответить
belly ndayikeza
belly ndayikeza - 14.08.2023 00:11

all i can say is thank you

Ответить
TUSHAR BHARANE
TUSHAR BHARANE - 29.07.2023 07:55

passport.deserializeUser() is not working and hence req.user is undefined

Please somebody help me

Ответить
Sweetcommando
Sweetcommando - 17.05.2023 03:03

Perfect tutorial. Literally just started backend and this is so easy to follow and understand.

Ответить
Omar Jùmà
Omar Jùmà - 16.05.2023 22:01

This is a very resourceful video🥰🥰, however, if you get this error after clicking on the email you want to login/ signup with "req.session.regenerate is not a function", kindly uninstall the version of passport and install passport 0.5 because there is an issue in passport 0.6
run --->> npm uninstall passport
then run -->> npm install [email protected]
It worked for me, hope it does for u🙂🙂

Ответить
Ammar Electricwala
Ammar Electricwala - 15.05.2023 06:04

Seriously your tutorials and indepth and simple to follow, kudos and thank you for all the hard work you have put in

Ответить
Nothing None
Nothing None - 05.05.2023 11:30

thanks a lot sir

Ответить
Jones TSE
Jones TSE - 27.03.2023 17:43

May I ask what colour theme are you using in this video?

Ответить
Anggriawan Ridatama
Anggriawan Ridatama - 17.03.2023 12:34

Hello sir, you did a great job explaining, really appreciate it.
I wonder how to connect loggedin user to MongoDB and connect passport with it

Ответить
tjyaooo
tjyaooo - 11.03.2023 05:40

Idk if anyone can help me.. in the success route, my req.user is undefined

Ответить
J Taylor
J Taylor - 10.03.2023 16:45

Excellent!

Ответить
naam gumnaam
naam gumnaam - 08.03.2023 21:11

In my app that I made same as yours, the user state is not being updated in the react components tree as seen in chrome dev tools. I can only see null when the user is logged in. even the console.log shows null value. and because of this, the navbar does not show the user being logged in. I'm using google sign in. There is no error in networks tab as well. the cookie is also getting set. What could be the problem? what can be done so that the user state is updated immediately? should there be more useEffect for refreshing the page?

Ответить
Manuel E. Ramírez
Manuel E. Ramírez - 27.02.2023 09:14

Thank you very much for to share info :)

Ответить
Reviewer Viral
Reviewer Viral - 19.02.2023 21:06

thanks

Ответить
Nihar Makwana
Nihar Makwana - 11.02.2023 20:14

Your videos are just <3 <3 <3

Ответить
Aditya
Aditya - 06.02.2023 12:12

Can you please list the extension you used for the shortcuts in vs code

Ответить
Dev CA
Dev CA - 02.02.2023 05:31

What if your session coockie expires but user still on the website? How would you refresh the session? You are not showing this but this is the most important part.

Ответить
Văn Mạnh Trần
Văn Mạnh Trần - 10.01.2023 10:48

Firstly, thank you for your tutorial. However, I've had a problem after I deploy my sever on Render, function doesn't work properly and its response is " Cannot get /auth/goole/callback" although I had configged like you. But if I request url "/auth/login/success", I can get profile of my GG account! It works perfectly on local btw. Please help me if you have some idea. Thank you again!

Ответить
adebisi sheriff
adebisi sheriff - 06.12.2022 22:13

Thank you so much for all you do. May God continue to strengthen you. We love you Lamadev!

Ответить
Wanani Adib
Wanani Adib - 30.11.2022 11:34

I was looking for hours how to handle redirects when you have a react app connected but no solutions anywhere you literally saved my life!!!!

Ответить
Giyuu
Giyuu - 19.11.2022 15:18

Awesome <3 Thank you so much :3

Ответить
Din Islam
Din Islam - 18.11.2022 18:21

Thanks😊😊😊

Ответить
Root Android
Root Android - 15.11.2022 14:39

Thanks

Ответить
Phas0ruk
Phas0ruk - 28.10.2022 00:45

Great video. I found that I couldnt use cookie-session and had to use express-session instead

Ответить
Jalal D. Alkhotami
Jalal D. Alkhotami - 17.10.2022 11:17

can someone tell me about req.logout, i have some error here

Ответить
Juhand Van.
Juhand Van. - 08.10.2022 06:56

thanks so much !

Ответить
Khang Trần Quốc
Khang Trần Quốc - 20.09.2022 10:39

Like shit where facebook?????

Ответить
dhruv puvar
dhruv puvar - 17.09.2022 17:27

worst tutorials bc

Ответить
Erenyegaa
Erenyegaa - 26.08.2022 19:38

When authentication succeeds and successredirecturl redirects me, it does not get relevant cookies and info, my controller method does not execute. After i deleted that it worked as it should but it takes me to a black page and does not redirect me where i want

Ответить
Masud Rana
Masud Rana - 10.08.2022 15:27

could you please make a tutorial for Authentication with email and password signin and signup api using MERN , please

Ответить
Félix Nogales
Félix Nogales - 04.08.2022 23:45

Very very good videos!! Maybe too much use of pixel units instead of rems or percentages in the css. But a very well done and very instructive videos. Thanks! Keep doing them.

Ответить
Himanshu Hemant
Himanshu Hemant - 04.08.2022 21:59

Best tutorial 🔥🔥

Ответить
Nazar
Nazar - 30.07.2022 12:52

thanks for the great tutorial, keep making videos like this

Ответить
Draco meteor
Draco meteor - 30.07.2022 06:28

lambda dev, the req.isAuthenticated returning false.

i want to protect my endpoint, only logged in user can access such endpoints, but on google auth it is not working.

Im just log in successfully but totally not authenticated via backend. even tho i send the profile at done(null, profile)

Ответить