Nest.js - full authentication course

preview_player
Показать описание
Nest JS authentication project build with Nestjs, Prisma, Postgresql, JWT and cookies.
Github repo:
Рекомендации по теме
Комментарии
Автор

I was struggling to understand the NestJS Authentication, but having seen this video. I am now able to setup the NestJS Authentication, thank you so much!

christopherodhiambo
Автор

Thank you so much Mike dev, now i know how to extractJwt from cookies in JwtStrategy, thanks again!

mamlzy
Автор

Thank you Sir for sharing your knowledge. Much appreciated.

khal-elbangcola
Автор

"They have a cat image, it's supposed to be good" 🤣

And actually it's good, thanks for the education BTW.

codewithstruckchure
Автор

Thank you for this video, what I was looking for exactly

CodewithAby
Автор

Saved my life man, the NextJS docs are kinda weird when it comes to auth.

murat
Автор

I feel like you could keep the service lvl cleaner like this: in sign in logic, you didn't have to pass req and res to the service level and could've handled as follows:
At the service level: async sign-in(dto) {
...The rest of your code
return token;
}

And then at the controller level:
async sign-in(dto, req, res) {
const token = await this.authService.sign-in(dto)
req.cookie("jwt", token, {...Your cookie options}).
}

owofrostyy
Автор

Explaination is very good but I faced error like everytime I get 401 UnAuthorized Access. My JWTToken and cookie generated successfully and also then contained correct credentials

suryaprakashchaudhary
Автор

how to use myuser api for fetching data... i get error unauthorised when i call from react frontend, i set token in token in cokies using jwt-token, then pass it by headers .. but not work.please give a axios example.. its urgent

mdhasanmia
Автор

I want to build a rest api that will be consumed by react admin(front-end) using sessions/http-only cookies and a mobile app using jwt tokens(stateless). Please can you advise me on how to structure/Architect my NestJS project to help me build this?

HenryOsim
Автор

Thank you so much, your video is perfect. I was looking for, but didn't find anthing while i saw youre video.
Interesting moment for me, 1:29:28 you logged by test2 account, but you can see test email and coun't see test2? Is it true? Or i misunderstood you maybe. I wish you a lot of subscribles.
if i have some mistakes, i am sorry🤭

fromntop
Автор

you can run prisma db push instead of the prisma migrate dev

babarzaman
Автор

How can i check if user already sign or not ?
In front end

reanyouda
Автор

Thanks for the great tutorial, you have any idea about how to send mail verification and forgot password please ?

BenfredjMaissa
Автор

Greate job! Need frontend with NextJS to this backend and rename fullstack to Patent plz :)

ВладимирГригин-по
Автор

Hi! Thank you very much for your video. I followed your tutorial, but I encountered a problem. When I try to post the email and password, nest.js will have an error: Invalid `prisma.users.create()` invocation in xxx and : Query createOneusers is required to return data, but found no record(s). Do you know how to solve this?

jll
Автор

Hi, what should i do?
JwtStrategy requires a secret or key

elaydit
Автор

what terrible thing happened to your mic ;)

onrightside
Автор

dude great video but damn why are you so slow

rafaelbarbosa
Автор

I follwed your course, and all works fine but guards. I cloned your project also and tried, but still when I put @UseGuards(JwtAuthGuard) I am facing 401 unauthorized error

bajranedim