Lucia Auth Role Based Protected Route - Lucia auth Next js, PostgreSQL, Typescript, Drizzle ORM

In this video I have implemented a protected route for only specific role. It was pretty easy.
Source code available on:
github.com/ugurkellecioglu/ne...

Пікірлер: 32

  • @kuba6547
    @kuba65472 ай бұрын

    Wow ! I was about to ask about it :D Thanks Ugur !

  • @ugurcodes

    @ugurcodes

    2 ай бұрын

    Haha:D that's awesome :D let me know if you have other things you'd like to see. I'd like to record video about them :) thanks!

  • @kuba6547

    @kuba6547

    2 ай бұрын

    Maybe some examples of building relations between different models with DrizzleORM (ForeignKeys, etc). I'm doing a prototype of time-tracking app with role based authentication on this stack: Lucia / PostgreSQL / Drizzle / Next.14 / TypeScript and Your content was very helpful so far :) @@ugurcodes

  • @whezboo
    @whezbooАй бұрын

    You've made me hit the subscribe button

  • @ugurcodes

    @ugurcodes

    Ай бұрын

    Omg! thanks :D

  • @simonhblanco
    @simonhblancoАй бұрын

    excelent and simple!! thanks

  • @ugurcodes

    @ugurcodes

    Ай бұрын

    thanks! Do you have any other content would you like to see?

  • @TheMERABANABER
    @TheMERABANABERАй бұрын

    I love these videos Uğur thank you so much, lucia definitely needs video tutorials

  • @ugurcodes

    @ugurcodes

    Ай бұрын

    Thank you so much 😊 these comments make me really happy!

  • @larrymcfarlane6202
    @larrymcfarlane6202Ай бұрын

    HI Ugur Codes, I've found your videos to be very helpful with both Lucia and Drizzle. I've also been wondering about a Redis alternative and you have that in one of your videos! Awesome work!

  • @ugurcodes

    @ugurcodes

    Ай бұрын

    Hi! thank you so much, you made my day :)

  • @kingjune6685
    @kingjune6685Ай бұрын

    great content! I think a video demonstrating how to use middleware for redirection in Next.js with Lucia would be incredibly useful. It'd help many understand the benefits of centralized redirection logic, particularly for larger projects. Looking forward to possibly seeing this!

  • @ugurcodes

    @ugurcodes

    Ай бұрын

    author of Lucia Auth, don't recommend using middleware. you can check out this article: pilcrowonpaper.com/blog/middleware-auth/

  • @madebyjonny7637
    @madebyjonny7637Ай бұрын

    Great video!

  • @ugurcodes

    @ugurcodes

    Ай бұрын

    Thanks!

  • @qualifyernst4576
    @qualifyernst45765 күн бұрын

    Can Lucia be used in a MERN stack, if it can, please do a tutorial

  • @xico6814
    @xico68142 ай бұрын

    Hahaha thank you very much 😅 And sorry for the inconveniences

  • @ugurcodes

    @ugurcodes

    2 ай бұрын

    Hahaha no I actually like getting people’s ideas and recording them. It was actually helpful to me. Thanks!🙏

  • @xico6814

    @xico6814

    2 ай бұрын

    I will change the permissions to make it another way then will PR and if you want you can make a video about it.

  • @carloscespedes495
    @carloscespedes495Ай бұрын

    can you create something with roles and permissions please either from scratch or with a library called casl js for creating permissions and assigning them to each user, this is much more scalable than just roles please.

  • @mrigankagogoi6262
    @mrigankagogoi6262Ай бұрын

    Can you share some tips on how to get started in upwork. Since you are a top rated developer in upwork your guidance will really help to get started in upwork.

  • @ugurcodes

    @ugurcodes

    Ай бұрын

    I'd be glad to record video around freelancing but I'm not sure if people would watch it

  • @ariburaco

    @ariburaco

    Ай бұрын

    They would watch 👍

  • @lev1ato

    @lev1ato

    Ай бұрын

    I also thought about asking for a video about it, I am definitely interested as well @ugurcodes 🙏

  • @yashrajjaiswal9941
    @yashrajjaiswal9941Ай бұрын

    if lucia manages session , then is it possible for us to create multi device login system like clerk 🤔

  • @yashrajjaiswal9941
    @yashrajjaiswal99412 ай бұрын

    is it possible to do this in next js middleware ?? so that we don't have to write the same code for every page

  • @naylord5

    @naylord5

    Ай бұрын

    Yes indeed, you can have a "routes" config file and setup the public and the privates routes, import it, then in the middleware check against user login, or in this case user specific role to conditionally redirect to another page.

  • @ugurcodes

    @ugurcodes

    Ай бұрын

    This should be technically possible. but since we are using a postgres instance that runs locally, or in a server, and pg on "crypto" package which cannot be used in a edge runtime (-middleware runs in the edge). But if we use a serverless database for example, neon, it may be possible. neon.tech/blog/how-to-use-postgres-at-the-edge

  • @yashrajjaiswal9941

    @yashrajjaiswal9941

    Ай бұрын

    @@ugurcodes can't use planetscale though 😆

  • @mehmethanifierenler3612
    @mehmethanifierenler3612Ай бұрын

    kardeşim türkçesi yok mu bunun

  • @ugurcodes

    @ugurcodes

    Ай бұрын

    Yok maalesef :( hangi tutorial türkçe ki bu zamanda

  • @mehmethanifierenler3612

    @mehmethanifierenler3612

    Ай бұрын

    @@ugurcodes haklısın, ücretli kompenentlerin yanın da ücretsiz olan abonelik ücreti istemeyen yazılımları da anlatırsan müteşekkir oluruz.