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
Wow ! I was about to ask about it :D Thanks Ugur !
@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
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
You've made me hit the subscribe button
@ugurcodes
Ай бұрын
Omg! thanks :D
excelent and simple!! thanks
@ugurcodes
Ай бұрын
thanks! Do you have any other content would you like to see?
I love these videos Uğur thank you so much, lucia definitely needs video tutorials
@ugurcodes
Ай бұрын
Thank you so much 😊 these comments make me really happy!
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
Ай бұрын
Hi! thank you so much, you made my day :)
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
Ай бұрын
author of Lucia Auth, don't recommend using middleware. you can check out this article: pilcrowonpaper.com/blog/middleware-auth/
Great video!
@ugurcodes
Ай бұрын
Thanks!
Can Lucia be used in a MERN stack, if it can, please do a tutorial
Hahaha thank you very much 😅 And sorry for the inconveniences
@ugurcodes
2 ай бұрын
Hahaha no I actually like getting people’s ideas and recording them. It was actually helpful to me. Thanks!🙏
@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.
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.
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
Ай бұрын
I'd be glad to record video around freelancing but I'm not sure if people would watch it
@ariburaco
Ай бұрын
They would watch 👍
@lev1ato
Ай бұрын
I also thought about asking for a video about it, I am definitely interested as well @ugurcodes 🙏
if lucia manages session , then is it possible for us to create multi device login system like clerk 🤔
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
Ай бұрын
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
Ай бұрын
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
Ай бұрын
@@ugurcodes can't use planetscale though 😆
kardeşim türkçesi yok mu bunun
@ugurcodes
Ай бұрын
Yok maalesef :( hangi tutorial türkçe ki bu zamanda
@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.