All in One NextJS And NestJS Full Authentication Monorepo Project

  Рет қаралды 18,867

Sakura Dev

Sakura Dev

Күн бұрын

Пікірлер
@contigen
@contigen 3 ай бұрын
Hey! Everyone kindly like the video, it's the least we could do
@SakuraDev
@SakuraDev 3 ай бұрын
Thank you so much 🙏. I really appreciate your support 💖
@Uraniumoff
@Uraniumoff 3 ай бұрын
@@SakuraDev Big thx
@SakuraDev
@SakuraDev 3 ай бұрын
Thank you so much,💖
@dreamsachiever212
@dreamsachiever212 3 ай бұрын
I wish we could like a video multiple times. I am glad to finally see videos getting many views as they deserve
@htk0002
@htk0002 Ай бұрын
Very comprehensive tutorial. The auth session management is definitely a complex topic but it was explained quite well. Kudos
@PattySpicy
@PattySpicy 3 ай бұрын
This is another level of full stack authentication. you are the one and only that teaching the authentication concept from scratch which help me a lot to understand how it work I will learn this today. thank you!
@SakuraDev
@SakuraDev 3 ай бұрын
Thank you so much, I am really glad to hear that
@GemCart-cl4dy
@GemCart-cl4dy 3 ай бұрын
one of the greatest and unique tutorial on KZbin.
@SakuraDev
@SakuraDev 3 ай бұрын
Thanks for your support 🙏. Your words mean a lot to me ❤️
@KalidAhmed-w5r
@KalidAhmed-w5r 2 ай бұрын
I wish I had known nestjs earlier! And thanks for the clear concise and complete tutorial. Subscribed.
@SakuraDev
@SakuraDev 2 ай бұрын
Much appreciated!
@prashlovessamosa
@prashlovessamosa 3 ай бұрын
Hey Sakura I have been playing around this stack totally loving it thanks for making this so comprehensive.
@SakuraDev
@SakuraDev 2 ай бұрын
Hey Prashant 👋, yes it's a great stack. I try to upload more videos about it
@AbdiwahabMohamed-n1n
@AbdiwahabMohamed-n1n 3 ай бұрын
God bless you sakura, you cannot imagine how i am happy
@SakuraDev
@SakuraDev 3 ай бұрын
Thank you so much ❤❤
@dreamsachiever212
@dreamsachiever212 3 ай бұрын
Great. let's go! Thanks for this comprehensive course
@SakuraDev
@SakuraDev 3 ай бұрын
Thanks for your support
@Mr_MicDaniel
@Mr_MicDaniel 3 ай бұрын
Awesome video, i love how you're doing both signin with Email and Password, and also Oauth implementation Can share repo
@SakuraDev
@SakuraDev 3 ай бұрын
Thank you so much. The repo is in the description now.
@earlycareerwithhimanshu
@earlycareerwithhimanshu 3 ай бұрын
Sir please make video on multi tenants
@SakuraDev
@SakuraDev 3 ай бұрын
This is good idea
@AjaySingh-jz8qx
@AjaySingh-jz8qx 3 ай бұрын
More turborepo tutorials please😊
@SakuraDev
@SakuraDev 3 ай бұрын
Yes I will do more of this type
@pjborowiecki2577
@pjborowiecki2577 3 ай бұрын
Wow! Amazing! Would love to see Redis implemented in there as well, for faster and more secure JWT handling
@SakuraDev
@SakuraDev 3 ай бұрын
Thanks, that's a good idea
@priyobrotokar
@priyobrotokar 3 ай бұрын
Hi, I am trying to call the updateSession in the route handler which is called using fetch from a server component, but it does not set any cookie in the browser though the fetch response has set-cookie.
@ferchamin1
@ferchamin1 3 ай бұрын
Fantastic video! Thank you very much!! I have a question: why do you handle the session and the cookie from Next instead of directly from the API?
@SakuraDev
@SakuraDev 3 ай бұрын
Good Point! It's because we use JWT based auth in the backend side, so we need to send JWTs and user data including the role of the user to the frontend. so we keep these data in session in the frontend. If we had used the session based in the BACKEND side, we wouldn't have needed to setup the session in the NextJS side, but this also raise some problems because every time we need the user data (i.e. role of the user), we would need to call backend APIs to get them. Hope that make sense to you. 💖🖐🏻
@alvesbernardino
@alvesbernardino 2 ай бұрын
Sakura, great work, I've done almost every thing I've even cloned your code, can't get updateTokens to work, when I log the cookie when updateTokens is called by the api I always get undefined, any lights here? Thanks, still a fantastic job.
@SakuraDev
@SakuraDev 2 ай бұрын
Let me check
@AfaDev36
@AfaDev36 2 ай бұрын
Yess I have the same issue, I even doubted my code and went ahead and tested the original code project repo, and it gave me the same issue, the refresh-token mechanism is not working. I've tested the API using postman and it worked just fine, so I don't thinks there is something wrong with the backend, I think it has something to do with the cookies() and updateTokens function. Please @SakuraDev if you solved this push it to the github repo Thank you a lot for this awesome tutorial!!!
@yudhiguntara3157
@yudhiguntara3157 3 ай бұрын
this is what I'm looking for. thanks dude!
@SakuraDev
@SakuraDev 3 ай бұрын
I am really glad it was helpful for you
@quantran4704
@quantran4704 Ай бұрын
This is really good and detail video, thank you.
@SakuraDev
@SakuraDev Ай бұрын
Thank you so much 🙏. I'm really happy that you like it. Thanks for your comment
@wellingtonbarbosa9046
@wellingtonbarbosa9046 3 ай бұрын
I loved the video! But something is bothering me. How can i access this user data from a CSR component once cookies are only acessible from server? I've tried to acess this data using a server action, but server actions give no return for CSR components. Can you explain it?
@wellingtonbarbosa9046
@wellingtonbarbosa9046 3 ай бұрын
One more thing. It would be great if you give us a public github repo of the developed project in video description. It helps a lot as a reference material. One more time, thanks for the video!
@SakuraDev
@SakuraDev 3 ай бұрын
You can read the cookie in the parent SSR component and then pass it to the CSR client component or you can put it in a react context
@SakuraDev
@SakuraDev 3 ай бұрын
I will add it in the description
@osarolawani3739
@osarolawani3739 3 ай бұрын
with the schema we have, are we to make a migration instead of an introspection after putting the schema in the schema.prisma file?
@SakuraDev
@SakuraDev 3 ай бұрын
Yes you need to do a migration
@franciscojosereyes9310
@franciscojosereyes9310 3 ай бұрын
Wow! Great video friend! Could you make some video about the usage of user related API keys generation and how to integrate with a seed SaaS project? Thanks again!
@SakuraDev
@SakuraDev 3 ай бұрын
Thanks, That's a good idea
@vihangasilva7947
@vihangasilva7947 3 ай бұрын
Can you explain how to get Prisma Schema please, because we cannot introspec database as you did in the 11:12
@SakuraDev
@SakuraDev 3 ай бұрын
The repo is in the description now.
@ChibuezeLawsonLoctech
@ChibuezeLawsonLoctech 3 ай бұрын
@@SakuraDev The api repo is found on the description kindly assist
@ChibuezeLawsonLoctech
@ChibuezeLawsonLoctech 3 ай бұрын
on the github repo, the api founder is not opening kindly assist
@SakuraDev
@SakuraDev 3 ай бұрын
@@ChibuezeLawsonLoctech Hi, The repo link is replaced with a new one in which I've fixed the issue. now you can access the api dir in the new repo
@rntbuilds
@rntbuilds 3 ай бұрын
Thanks. I think i like your content already. Tackling Google auth from the server not client. 👍
@SakuraDev
@SakuraDev 3 ай бұрын
Thanks 🙏💖
@codernerd7076
@codernerd7076 3 ай бұрын
awesome! now I just need find a way to deploy it to vercel or something, not sure if it works with turborepo :(
@SakuraDev
@SakuraDev 3 ай бұрын
I will come up with a solution
@DEVKushal-t8b
@DEVKushal-t8b 2 ай бұрын
Hey I am in my final year thank you for this i hope making more content like this thank you so much
@SakuraDev
@SakuraDev 2 ай бұрын
You got this!
@PattySpicy
@PattySpicy 3 ай бұрын
how can i setup verify email, forget password and OTP for any confirmation. i can do with NestJS but totally confuse how to connect this functionality NestJS with NextJS
@SakuraDev
@SakuraDev 3 ай бұрын
I should add a video for that. I will do that
@bland-username
@bland-username 3 ай бұрын
Hats off to you, sir
@SakuraDev
@SakuraDev 3 ай бұрын
Thank you so much! 🙏 I'm really glad you enjoyed the video. Your support means a lot-more content is on the way! 💻
@irawan953
@irawan953 2 ай бұрын
Thanks for the amazing tutorial
@SakuraDev
@SakuraDev 2 ай бұрын
Thanks 🙏❤️
@joelveloz7312
@joelveloz7312 3 ай бұрын
How would the process of maintaining sessions from the database be?
@hugues8839
@hugues8839 3 ай бұрын
Thank you . I need this course but can you add a deploy repo on vercel
@SakuraDev
@SakuraDev 3 ай бұрын
I will create a video soon that
@vihangasilva7947
@vihangasilva7947 3 ай бұрын
In authFetch function which you created to send authenticated requests to backend, I faced an error when I refresh the tokens, In my project cookies are not fetching at all in route handlers or server actions. Because of that always triggering request to backend for get new tokens and not modifiying the cookie in browser. How can I resolve this problem ?
@SakuraDev
@SakuraDev 3 ай бұрын
What is the error message?
@vihangasilva7947
@vihangasilva7947 3 ай бұрын
@@SakuraDev According to your solution in video it seems working fine (without showing error), But every time when I send request to backend via authFetch() function after accessToken expired, its calling to update-tokens route handler. Because cookie is not modifying at all in route handler.
@SakuraDev
@SakuraDev 3 ай бұрын
@vihangasilva7947 yeah, it should call the update-token route handler, because we only can update the cookie inside a route handler or a server action which is called by a client form
@hughqing2628
@hughqing2628 3 ай бұрын
excatly what I am looking for!!!
@SakuraDev
@SakuraDev 3 ай бұрын
I am really glad it was helpful for you
@max_wbw
@max_wbw Ай бұрын
Great video! Just one question, how to make a monorepo deploy on Vercel for example? Just like a normal Next.js application?
@SakuraDev
@SakuraDev Ай бұрын
I will create a video for deploying the Monorepo
@Jonazao
@Jonazao Ай бұрын
@@SakuraDev Looking forward for this!
@franciscojosereyes9310
@franciscojosereyes9310 3 ай бұрын
Another question is where should we validate the expiration time for the JWT because we are only validating the user.id is from one stored user in DB. Should be validated also the expirateIn in the JWT process?
@SakuraDev
@SakuraDev 3 ай бұрын
Hi, 👋 . It's done by local strategy under the hood
@franciscojosereyes9310
@franciscojosereyes9310 3 ай бұрын
@@SakuraDev Yeah, my fault. Just was using another env file with a new expiration time, then was not affecting to the test. Thank you so much for your quick reply.🙂
@SakuraDev
@SakuraDev 3 ай бұрын
@@franciscojosereyes9310 💖🙏
@anthonymichael2614
@anthonymichael2614 3 ай бұрын
thanks so much for this tutorial it is more than helpful🥰
@SakuraDev
@SakuraDev 3 ай бұрын
Thank you so much
@鍾豪方
@鍾豪方 25 күн бұрын
Hi Thanks for this amazing video. I have a question. How can I use the authFetch in client component? since we can‘t get session from client side in JavaScript, then how can we call server in client components? ty
@SakuraDev
@SakuraDev 21 күн бұрын
To use authFetch in a client component, you need to get the session from the server-side first and then pass it to the client. This ensures secure handling of the session data. I'll be covering this in more detail soon-stay tuned!
@SakuraDev
@SakuraDev 21 күн бұрын
Thanks for your comment btw
@codeagency
@codeagency 3 ай бұрын
Do you have a version where prisma is replace with drizzleorm? Or maybe a followup video that shows which parts relevant and what changes for drizzleorm?
@SakuraDev
@SakuraDev 3 ай бұрын
I should add a video replacing drizzle orm with prisma
@codeagency
@codeagency 3 ай бұрын
@@SakuraDev thank you 🙏
@owenn602
@owenn602 3 ай бұрын
Please make more videos using Next and Nest torgether like this
@SakuraDev
@SakuraDev 3 ай бұрын
I will do that
@franciscojosereyes9310
@franciscojosereyes9310 3 ай бұрын
Hi friend again, one question, if after logout I try to use the previous accessToken still valid before expired, it will be valid although we logout before. Is there any option to revoke also access tokens? Thanks in advance.
@SakuraDev
@SakuraDev 3 ай бұрын
You can use the same approach we used in refresh Token invalidation. Or you can use a short lifespan access token.
@franciscojosereyes9310
@franciscojosereyes9310 3 ай бұрын
@@SakuraDev Great, and thank you so much again for your quick reply. Have a great end of weekend and next week. Waiting for the next tutorial 😀
@SakuraDev
@SakuraDev 3 ай бұрын
@franciscojosereyes9310 Thanks for your support. I am creating a long tutorial like this one.
@franciscojosereyes9310
@franciscojosereyes9310 3 ай бұрын
@@SakuraDev Great my friend!!! 🙏 Always thank you for your great content and your professionality!
@SakuraDev
@SakuraDev 3 ай бұрын
@@franciscojosereyes9310 Thank you so much ❤️🙏
@thepromisebenard
@thepromisebenard 2 ай бұрын
Nice video Sakura. Please what theme and font are you using for your code editor?
@SakuraDev
@SakuraDev 2 ай бұрын
Hi, bearded theme and jetbrains font
@_abrar_shahriar_
@_abrar_shahriar_ Ай бұрын
I am very curious why for signout we use API instead of server function like SignIn and SignUp? And I'm also curious why in the video it works with next/link, but I (and not only) it only works with ? (2)
@SakuraDev
@SakuraDev 21 күн бұрын
We use an API for signout because cookies can only be edited on APIs or server actions called by client components. In this case, since we want to remove the cookie in a server function, we can’t directly remove it there. Instead, the API handles the secure removal of the cookie.
@jerrymalloney625
@jerrymalloney625 3 ай бұрын
it is possible for you sakura to leave the repo link so we can navigate the code?
@SakuraDev
@SakuraDev 3 ай бұрын
Hey. The repo is in the description now.
@lgiorgos1
@lgiorgos1 3 ай бұрын
we have no access in api folder on the repo!
@SakuraDev
@SakuraDev 3 ай бұрын
I just replaced the repo link. Please use the new repo link in the description.
@osarolawani3739
@osarolawani3739 3 ай бұрын
I can't access the api directory in the github repo
@SakuraDev
@SakuraDev 3 ай бұрын
hey, Thanks for your feedback. The GitHub Repo Link is updated in the repo and the issue is fixed now. check the new link in the description please
@Deus-lo-Vuilt
@Deus-lo-Vuilt 3 ай бұрын
Thank you very much, very interesting content
@SakuraDev
@SakuraDev 3 ай бұрын
Thank you so much
@tekne9947
@tekne9947 2 ай бұрын
Is there any chance you could show something similar but using tRPC to communicate between NestJS and Next.js for end-to-end type safety?
@SakuraDev
@SakuraDev 2 ай бұрын
That is a good idea 💡. The next one is about graphql and the next Will be on tRPC
@inakiuy
@inakiuy 3 ай бұрын
I am just starting to code and I was looking for a project like this to play around. I was very hard to find a project with separate front and back.
@SakuraDev
@SakuraDev 3 ай бұрын
Hi, Thanks for your support, I will upload more projects like this.
@inakiuy
@inakiuy 3 ай бұрын
@@SakuraDev I saw a comment that the refresh token is not working. How would you resolve this issue? I found a lot of videos about implementing access and refresh tokens but none is resolving this in a context like this where the front is separate from the back. It a core functionalty in this video and it would be nice to see a working implementation. At least in the repo. great work! thx!
@SakuraDev
@SakuraDev 3 ай бұрын
@@inakiuy The problem is that the cookie is not accessible in the api route. the solution is to use database session. in the next video I will explain that
@hooyah
@hooyah 29 күн бұрын
it is ok to encrypt all (access,refresh toen) cuz token can be decrypt so easy, if attacker steal our session token, they can have access directly to backend. and 1 more. if we store session in http only secure samesite lax, Are we confident that nothing can be stolen?
@SakuraDev
@SakuraDev 21 күн бұрын
You're right! Encrypting tokens is important, but if an attacker gains access to the session, they can still compromise the backend. Storing session in httpOnly and SameSite=Lax helps improve security, but it’s always recommended to combine it with other security measures like proper token validation and secure storage practices. While it reduces risk, nothing is entirely foolproof, so continuous monitoring and securing the entire system are crucial.
@hooyah
@hooyah 21 күн бұрын
@SakuraDev okay i got it. thanks. i have already encrypted session token wit jose library. many thanks for your help 🙏
@viniciuscosta7202
@viniciuscosta7202 2 ай бұрын
I have a problem when users logout and go to the /api/auth/signout, the route redirects the user to the signin page. But the header still shows the user name. It needs to refresh the page to render the header correctly.
@SakuraDev
@SakuraDev 2 ай бұрын
Use tag instead of for sign out
@viniciuscosta7202
@viniciuscosta7202 2 ай бұрын
@@SakuraDev yeah. it worked. Thanks! ❤
@lapat2310
@lapat2310 Ай бұрын
@@SakuraDev Hi, helpful video, thank you. I am very curious why for signout we use API instead of server function like SignIn and SignUp? And I'm also curious why in the video it works with next/link, but I (and not only) it only works with ?
@lapat2310
@lapat2310 Ай бұрын
@@SakuraDev I have tested this with the SignOu server function and it works fine without refreshing the page, what are the disadvantages of this solution?
@praveenkumarsingh3079
@praveenkumarsingh3079 24 күн бұрын
This works fine, but i am facing one issue with this is when i am refreshing the token i am not able to update it in session. So accesstoken and refresh token remains the old one even after getting from the refreshToken api. Any idea how can i solve this?
@SakuraDev
@SakuraDev 21 күн бұрын
Thanks for bringing this up! I actually found this issue myself after uploading the video. For now, the only solution I've found is using session databases. I'm still researching a fix for cookie-based sessions, and once I find it, I'll upload an updated solution. Stay tuned!
@afdhaliapreto7703
@afdhaliapreto7703 2 күн бұрын
@@SakuraDev how about using next-auth, i do for all my projects with next js as frontend. with next auth you can removing controller for google OAuth, next-auth will do it for all of the rest.... in nest js, you just handle token and refresh token. pass them to next-auth, it will do all for all the rest...
@afdhaliapreto7703
@afdhaliapreto7703 2 күн бұрын
@@SakuraDev Authentication Flow Between Next.js (Next-Auth) and NestJS Backend Initial Authentication: User submits login credentials through Next.js frontend Next-Auth forwards these credentials to NestJS backend (including Google Oauth if succeded) Backend validates and generates both access & refresh tokens Tokens are stored in database for history tracking Tokens are returned to Next-Auth Session Management: Nexr-auth will handle it on just client side Token Refresh Mechanism: Next-Auth monitors token expiration When access token expires: Next-Auth sends refresh token to backend Backend validates refresh token against database Backend generates new token pair New tokens are updated in database New tokens are returned to Next-Auth Next-Auth updates its session Logout Process: User initiates logout Next-Auth clears session Backend removes tokens from database All active sessions are invalidated Security Measures: Tokens are stored with expiration timestamps Expired tokens are automatically cleaned from database Each token pair is unique per login session Refresh tokens are single-use Token revocation is possible through database
@SakuraDev
@SakuraDev 2 күн бұрын
@@afdhaliapreto7703 It's is a great choice. But if you want to handle OAuth in nestJs, we can't create a session in Next-Auth upon a successful sign in with OAuth in Nestjs. Do you have a solution for that?
@lamhoang6198
@lamhoang6198 3 ай бұрын
the project looks decent. But i think you need to increase the quality of the audio. I do need to increase my volumn to the maximum so that i can hear what you were saying on the video.
@SakuraDev
@SakuraDev 3 ай бұрын
Thanks for your feedback 🙏
@Next-Js
@Next-Js 23 күн бұрын
I find this monorepo very interesting
@SakuraDev
@SakuraDev 21 күн бұрын
Glad you find it interesting! Monorepos can be super powerful for managing projects efficiently. Let me know if you’d like to see more content or a deeper dive into this setup!
@alejandrojoseurielessalced423
@alejandrojoseurielessalced423 Ай бұрын
el sistema de autenticacion, registro, rutas protegidas etc que manejas es muy extenso y tedioso, he visto otros que son más sencillos y concisos, sin embargo se te agradece sacar el tiempo para explicar esto
@SakuraDev
@SakuraDev Ай бұрын
¡Gracias por tu comentario! Entiendo que el sistema puede parecer extenso. Si prefieres algo más sencillo, podrías probar con Firebase o Supabase, que simplifican mucho la autenticación. Si necesitas una versión más simple o explicación de algo, ¡avísame! 😊
@prashlovessamosa
@prashlovessamosa 3 ай бұрын
i did not get the notfication thanks sakura please make some thing on multi tenancy.
@SakuraDev
@SakuraDev 3 ай бұрын
Hey Prashant, I am doing some research for that and then I will create a video about it
@prashlovessamosa
@prashlovessamosa 3 ай бұрын
I will try to build something with svelte nest js.
@avaygc5646
@avaygc5646 2 ай бұрын
Can u create a e-commerece project in next js and nest js will really be helpful
@SakuraDev
@SakuraDev 2 ай бұрын
The next video is a blog project with this stack. And the next one is going to be an E commerce project
@danhcox
@danhcox 25 күн бұрын
​@@SakuraDev when will you finish your blog project? i really hope you will publish it soon sir
@SakuraDev
@SakuraDev 25 күн бұрын
@danhcox It's almost finished. It will be published next week. Thanks for your patience 🙏
@AdityaSharma-t3c
@AdityaSharma-t3c Ай бұрын
how does this 'rafce' works to init a react code, which lib gets this, i want this too
@SakuraDev
@SakuraDev Ай бұрын
just install react snippet extension
@tuffstuffmedia
@tuffstuffmedia 16 күн бұрын
such a great video
@SakuraDev
@SakuraDev 16 күн бұрын
I appreciate you taking the time to watch!
@alejandrojoseurielessalced423
@alejandrojoseurielessalced423 12 күн бұрын
hay un error en la logica del accestoken y el refreshtoken, y es que una vez que se ingresa a la ruta protegida no deberian crearse nuevos tokens debido a que el refreshtoken deberia remplazar el asscestoken que en este caso solo dura 60 S, en cambio lo que se hace es crear dos tokens nuevos sin usar la configuracion del refreshtoken que esta hecho para que dure 7D, sin embargo esta logica que se usa aca solo sirve para una vez, porque cuando se intenta acceder a la ruta protegida por segunda vez(/auth/protected), como el refreshtoken no remplaza el accestoken, entonces el servidor da un "usuario no autorizado
@SakuraDev
@SakuraDev 11 күн бұрын
I understand your concern about the logic of access and refresh tokens. I'll address this in detail in an upcoming video.
@surendrawagle8341
@surendrawagle8341 10 күн бұрын
Yeah I faced same problem .please fix it
@alejandrojoseurielessalced423
@alejandrojoseurielessalced423 7 күн бұрын
@@SakuraDev hay que agregar la logica cuando el accesstoken expira
@evasamarques
@evasamarques 3 ай бұрын
Please, how to get Prisma Schema?
@SakuraDev
@SakuraDev 3 ай бұрын
I will include it in the description
@SakuraDev
@SakuraDev 3 ай бұрын
The repo is in the description now.
@cardosoassuncao7565
@cardosoassuncao7565 3 ай бұрын
excellent!!!
@SakuraDev
@SakuraDev 3 ай бұрын
Thank you so much
@joelveloz7312
@joelveloz7312 3 ай бұрын
Could you add a tutorial on how to add an OTP by email and the forgot password?
@SakuraDev
@SakuraDev 3 ай бұрын
Yes. I will add it in the next video
@Aufafkri
@Aufafkri 3 ай бұрын
I'm having trouble setting up the prism schema
@SakuraDev
@SakuraDev 3 ай бұрын
The repo is in the description now.
@KrisnoMukti
@KrisnoMukti 3 ай бұрын
where is the schema in the repo located?
@idalopezcastro8211
@idalopezcastro8211 3 ай бұрын
same question, I cant to find the schema file on github :(
@SakuraDev
@SakuraDev 3 ай бұрын
Thanks for your feedback. the link of repo is updated and now you can access it. This is the link of the schema file: github.com/vahid-nejad/NestJS-NextJS-Authentication-Turborepo/blob/main/apps/api/prisma/schema.prisma
@SakuraDev
@SakuraDev 3 ай бұрын
This is the link of the schema file: github.com/vahid-nejad/NestJS-NextJS-Authentication-Turborepo/blob/main/apps/api/prisma/schema.prisma
@victormayowa7989
@victormayowa7989 3 ай бұрын
Was so confused about the connection between the localstrategy and LocalAuthGuard.... I won't mind if someone clarify
@SakuraDev
@SakuraDev 3 ай бұрын
Local auth guard is a ware which activates the local strategy
@joelveloz7312
@joelveloz7312 3 ай бұрын
How can I make sure that this whole process is safe?
@SakuraDev
@SakuraDev 3 ай бұрын
it is recommended by the official documentation.
@chanmyaemaung
@chanmyaemaung 3 ай бұрын
@SakuraDev
@SakuraDev 3 ай бұрын
Thanks 🙏
@borooLIVE
@borooLIVE 3 ай бұрын
nice nice nice! thank you!
@SakuraDev
@SakuraDev 3 ай бұрын
Thank you so much
@thutanyan1381
@thutanyan1381 3 ай бұрын
You should make like blog project using Nestjs and Nextjs or something frontend Reactjs
@SakuraDev
@SakuraDev 3 ай бұрын
Yeah, that's a good idea. i am planning for that
@katherinmumbunan9916
@katherinmumbunan9916 3 ай бұрын
HI, can you share the schema? Thanks
@SakuraDev
@SakuraDev 3 ай бұрын
Hi, it's on the repo. Please check the description
@Uraniumoff
@Uraniumoff 3 ай бұрын
Hello, can you give an link to github Repository please !! ?
@SakuraDev
@SakuraDev 3 ай бұрын
Hey, it's in the description
@newgenico
@newgenico 3 ай бұрын
@@SakuraDev Hi. the api folder is a link. No access. Thanks
@SakuraDev
@SakuraDev 3 ай бұрын
@@newgenico Thanks for your feedback. The repo link is updated now and I fixed the issue. this is the link to the new repo: github.com/vahid-nejad/NestJS-NextJS-Authentication-Turborepo you can also find it in the description
@lingadurai5805
@lingadurai5805 3 ай бұрын
Thank you so much
@SakuraDev
@SakuraDev 3 ай бұрын
Thanks for your support ❣️
@tinydev2683
@tinydev2683 3 ай бұрын
hey hey, thanks for the video 💛, could u share repo with source code?
@SakuraDev
@SakuraDev 3 ай бұрын
Hey. Thanks. The repo is in the description now.
@mtdesigner3933
@mtdesigner3933 3 ай бұрын
tnxs a lot❤only increase your voice volume plzz
@SakuraDev
@SakuraDev 3 ай бұрын
Thanks for your feedback. I will do that
@shree_divyansh
@shree_divyansh 3 ай бұрын
this code doesn't work, the refresh token functionality doesn't work
@SakuraDev
@SakuraDev 3 ай бұрын
Yeah I found that cookie Is not accessible in the API route. The ultimate solution is a database session. although I am searching for a solution with a cookie session and if I find one, I will fix it in the repo and also mention it in the next video. Thanks for bringing that to my attention.
@shree_divyansh
@shree_divyansh 3 ай бұрын
@@SakuraDev I figured out a working solution for my app, I'm using session cookies. Using nextjs middleware I'm updating the session. Its difficult to explain the whole process here.
@SakuraDev
@SakuraDev 3 ай бұрын
@@shree_divyansh That's great. Can you share a code example?
@DatNguyen-wb8jr
@DatNguyen-wb8jr 3 ай бұрын
@@shree_divyansh can u share the github repo for me
@shree_divyansh
@shree_divyansh 3 ай бұрын
@@DatNguyen-wb8jr Hey I can't share the github repo, working on some business app, can share the few code and logic explanation so that you all can also implement it
@AydinVivik
@AydinVivik 3 ай бұрын
It's a great approach, but I wondered why you never prefer session-based auth? All the examples in your videos are token-based.
@SakuraDev
@SakuraDev 3 ай бұрын
Yeah! I should try this
@imkir4n
@imkir4n 3 ай бұрын
1:17:00
@imkir4n
@imkir4n 3 ай бұрын
very well explained. W Sakura Dev
@SakuraDev
@SakuraDev 3 ай бұрын
@imkir4n Thanks for your support ❤️
@imkir4n
@imkir4n 3 ай бұрын
@@SakuraDev I successfully implemented this approach, and it worked wonderfully. Honestly, I was searching for a solid pattern to handle authentication without relying on NextAuth or any third-party providers, so we could manage it through our own separate backend.
@SakuraDev
@SakuraDev 3 ай бұрын
I am glad it was helpful for you. And I personally prefer this approach
@AtomicPixels
@AtomicPixels 2 ай бұрын
We need social auth. That’s the only thing people struggle with. Email and pass were cooked decades ago already. Nothing new there.
@SakuraDev
@SakuraDev 2 ай бұрын
Google authentication is included in this video.
NestJS GraphQL Course
1:01:33
Sakura Dev
Рет қаралды 838
Learn Turborepo By Example | Code Sharing, Distributed Cache, & More!
1:47:05
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
Session Vs JWT: The Differences You May Not Know!
7:00
ByteByteGo
Рет қаралды 332 М.
API Authentication: JWT, OAuth2, and More
6:12
ByteMonk
Рет қаралды 26 М.
BEST Next.js Frontend + NestJS API Combo for 2024!
16:06
Orc Dev
Рет қаралды 7 М.
The Right way to write Nest.js & Typescript clean-code - SOLID
17:55
Why aren't you using Fastify? Or Koa? Or NestJS?
9:58
Maximilian Schwarzmüller
Рет қаралды 75 М.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН