NestJS Google OAuth 2 + React App

Поділитися
Вставка
  • Опубліковано 8 лют 2025

КОМЕНТАРІ • 67

  • @SakuraDev
    @SakuraDev  5 місяців тому +1

    Hey Developers 🖐🏻 Your Likes ❤ and comments 💬 means world to me. So please Like❤ and Share⭐ this video to support me.🙏🙏🔥🔥

  • @hughqing2628
    @hughqing2628 3 місяці тому +3

    I already did several courses for NestJS already and developed some projects with it. Today I accidentally clicked into your video and found out your video is one of the most clear and easy-to-understand courses I have ever seen. Thanks

    • @SakuraDev
      @SakuraDev  3 місяці тому

      Thanks for your support 🙏❤️

  • @Mahadev-x7u
    @Mahadev-x7u 5 місяців тому +1

    First amazing video of this branch on UA-cam… 🔥 thank you so very much 💯

    • @SakuraDev
      @SakuraDev  5 місяців тому +1

      Thank you so much! Your support means a lot! 💯🔥

  • @willswill8163
    @willswill8163 3 місяці тому

    Great video, Sakura. You explain everything clearly and effectively. Keep up the good work!

    • @SakuraDev
      @SakuraDev  2 місяці тому

      Thank you! Will do!

  • @bhalperin
    @bhalperin 5 місяців тому

    Super helpful! Together with your public Github repo, this series of videos constitute a perfect guide of nestjs and any front-end fw (in my case Angular)

    • @SakuraDev
      @SakuraDev  5 місяців тому

      Thanks for your support. I'm glad you're finding the series helpful! 😊🙏

  • @minhducPham0511
    @minhducPham0511 4 місяці тому +1

    I have almost finished your course, thank you for your effort

  • @maso4u
    @maso4u 16 днів тому

    great tutorial

    • @SakuraDev
      @SakuraDev  16 днів тому

      I'm glad you found it helpful!

    • @SakuraDev
      @SakuraDev  16 днів тому

      By the way, if you enjoy learning and want to dive deeper into computer science topics made simple, I run another channel where I summarize key concepts from popular programming books. I would be very glad if you subscribe to my new channel: ua-cam.com/channels/ZYhXrFwhFUOXuSQNgfk-Sw.html

  • @apdiwhapmohmet4458
    @apdiwhapmohmet4458 5 місяців тому +1

    Amazing video, God bless you

    • @SakuraDev
      @SakuraDev  5 місяців тому +1

      Thank you so much! I'm glad you enjoyed the video. God bless you too! 😊✨

    • @apdiwhapmohmet4458
      @apdiwhapmohmet4458 5 місяців тому

      @@SakuraDevplease sir if you can make a fullstack with nestjs and nextjs
      That will be great sir

    • @SakuraDev
      @SakuraDev  5 місяців тому

      @@apdiwhapmohmet4458 yes I going to do that

  • @Lucid-xg6ur
    @Lucid-xg6ur 5 місяців тому

    Thank you for great video today!

    • @SakuraDev
      @SakuraDev  5 місяців тому

      You're welcome! I'm glad you enjoyed it! 😊🎥

  • @PattySpicy
    @PattySpicy 5 місяців тому

    this tutorial is amazing, I understand even better and if you don't mind, Could you please add part 2 with NextJS and cookies or session cookies.

    • @SakuraDev
      @SakuraDev  5 місяців тому +2

      Thank you! I’ll definitely consider adding a part 2 focusing on Next.js and handling cookies or session cookies. Stay tuned for more content! 😊🔥

    • @PattySpicy
      @PattySpicy 5 місяців тому

      @@SakuraDev so excited !! , thank you

  • @ジャンギルラフルJANGIRRAHUL
    @ジャンギルラフルJANGIRRAHUL 5 місяців тому

    good job brother sakura

    • @SakuraDev
      @SakuraDev  5 місяців тому

      Thanks for your support 🙏🙏

  • @furkanc6407
    @furkanc6407 5 місяців тому

    Thank you 🚀🚀

    • @SakuraDev
      @SakuraDev  5 місяців тому

      Thanks a ton, Furkan! 🙏🙏❤️

  • @bhooom2389
    @bhooom2389 5 місяців тому

    Amazing ❤️

    • @SakuraDev
      @SakuraDev  5 місяців тому

      Thank you! ❤️

  • @prashlovessamosa
    @prashlovessamosa 5 місяців тому

    Great Sakura

    • @SakuraDev
      @SakuraDev  5 місяців тому

      Thanks a lot, Prashant! 🌸😊

  • @samihabuawad3023
    @samihabuawad3023 7 днів тому

    Hi
    Thanks for the walkthrough
    I have faced one issue when having API and front-end (nextjs) in different domains, and after hours, I had solved it by opening the API endpoint related to getting the google oauth url in a NEW TAB so it will be in the same origin -- this cause CORS error I was getting to gone and successfully logging in
    I hope this may help someone later having similar situation as it is common having FE and API in different domians.

    • @khaledamr5023
      @khaledamr5023 7 днів тому +1

      im facing this problem , thanks for you comment

  • @tarunparmar831
    @tarunparmar831 Місяць тому

    Thank you so much for this video. I have finally implemented signin in with google properly.
    I noticed you have a hardcoded frontend redirect url in your google/callback route. Can someone share how would i pass this frontend redirect url in the sign in with google api call so that it can be dynamic?
    Thanks

    • @SakuraDev
      @SakuraDev  Місяць тому

      You can get the url in nextjs and then pass it with a search query to back end api

  • @nidhalchelhi2655
    @nidhalchelhi2655 5 місяців тому +2

    can you make a tutorial on how to link this auth api with a Nextjs front end !

    • @SakuraDev
      @SakuraDev  5 місяців тому +3

      Absolutely! I'll work on a tutorial that covers linking the auth API with a Next.js frontend. Stay tuned for that! 😊

  • @netsudro
    @netsudro Місяць тому

    Started learning NestJs, React and Next. (I am comming from the Laravel world).
    My experience so far: You have to write a lot of code just to do a simple thing. I mean, what's the point of packages if you still have to do a lot of setup to use them? Also I din not find an ORM to do things as simple as Eloquent in Laravel. Time will prove me wrong I know, I hope.

    • @SakuraDev
      @SakuraDev  Місяць тому +1

      Hi, 👋 welcome to my channel. Yeah you're right about the configuration of passport packages. And for ORM, the Prisma might be a good choice for you.

  • @pangeaos
    @pangeaos 5 місяців тому

    Awesome video. Could you do an example with NextAuth.js ??

    • @SakuraDev
      @SakuraDev  5 місяців тому +1

      Absolutely! I'll work on a tutorial that covers linking the auth API with a Next.js frontend. Stay tuned for that! 😊

  • @mustapharabiuadeola3646
    @mustapharabiuadeola3646 4 місяці тому

    Brilliant effort.
    Can you micro-service with Nestjs, Pls

    • @SakuraDev
      @SakuraDev  4 місяці тому +1

      Thanks 🙏. Yes I am planning for micro services course

  • @Herox_Js
    @Herox_Js 5 місяців тому

    i love your tutorials, could you make a video how to add facebook login on nestjs

    • @SakuraDev
      @SakuraDev  5 місяців тому

      Thanks. Great suggestion!

  • @venobrun
    @venobrun 4 місяці тому

    What is next? When user receive token via redirect link from google/login request? How can we get user name email and etc?

    • @FloKorp86
      @FloKorp86 2 місяці тому +1

      The token doesn't contain the personal information, it only authenticates the logged in user and says they are allowed to perform actions on your API. One of those actions for example is getting the user info from the database so you can use it in the frontend.

  • @zayyanabdillah7031
    @zayyanabdillah7031 3 місяці тому

    i encountered Error: Login sessions require session support. Did you forget to use `express-session` middleware?, why on your video not error the same as me? do I miss something?

  • @MultiVasya
    @MultiVasya 4 місяці тому

    I'm a little bit confused where did you get login function in auth service )))

  • @mileandrews4358
    @mileandrews4358 2 місяці тому

    Where is the previus video of this course?

    • @SakuraDev
      @SakuraDev  2 місяці тому

      Hi, this is the playlist:
      ua-cam.com/play/PLhnVDNT5zYN_PfPXedWpMy_UTeYNExbfR.html

  • @w3mw
    @w3mw 5 місяців тому

    nice video,
    Is it possible to work with cookies instead?
    To save that accesstoken, and use Cookies() in the frontend (next js) for example?

    • @SakuraDev
      @SakuraDev  5 місяців тому +4

      Thank you! Yes, it is possible. In the next video I will do that

    • @nidhalchelhi2655
      @nidhalchelhi2655 5 місяців тому

      @@SakuraDev when do we expect that next video ! thanks for the content btw very helpful !

  • @patelmonil7649
    @patelmonil7649 Місяць тому

    how to manage for multi-tenant application

    • @SakuraDev
      @SakuraDev  Місяць тому

      Well you need to keep track of all issued JWTs. I think I should create a video about it

  • @markjones6894
    @markjones6894 5 місяців тому

    It’s a good segue for supabase auth integrated with nest and next no? :)

    • @SakuraDev
      @SakuraDev  5 місяців тому

      Definitely! Integrating Supabase Auth with NestJS and Next.js is a great idea. I'll make sure to include that in the upcoming tutorials. Stay tuned! 😊

  • @juanjara5086
    @juanjara5086 4 місяці тому

    What is your theme vs code?

    • @SakuraDev
      @SakuraDev  4 місяці тому

      It's bearded theme

  • @MiguelAngel-ot2br
    @MiguelAngel-ot2br 4 місяці тому

    Login sessions require session support. Did you forget to use `express-session` middleware?
    I've got this problem, does anyone know how to fix it?

    • @SakuraDev
      @SakuraDev  4 місяці тому

      We use jwt based auth in this video which is a stateless auth approach and we don't need express-session. the other option is session-based auth in which we need to setup express-sessions. I will record a video for session based auth.

  • @ysdev___
    @ysdev___ 5 місяців тому

    @SakuraDev Hey Bro! Could you make a video about migration with TypeORM?

    • @SakuraDev
      @SakuraDev  5 місяців тому

      Hey! Sure thing, I’ll add a video on TypeORM migrations to the list. Stay tuned! 😊🔧

  • @AdityaSharma-t3c
    @AdityaSharma-t3c 2 місяці тому

    I have watched all your series from start but there is one problem, Your User/Login and Auth/login are both login endpoints, but are still serving 2 different purposes, i guess you need to combine all the 'auth/' logic into your 'user/ ' endpoints to make it even .

    • @SakuraDev
      @SakuraDev  2 місяці тому

      Thanks for the feedback, I will consider this in the future.

  • @venobrun
    @venobrun 4 місяці тому

    I got an error like this TypeError: res.setHeader is not a function
    at strategy.redirect (/Users/griboriy/Documents/work/nest-app/node_modules/passport/lib/middleware/authenticate.js:340:13)
    the only difference I am using fastify instead of express