How to setup Lucia auth in Next.js (in 8 minutes)

  Рет қаралды 13,252

Web Dev Cody

Web Dev Cody

Күн бұрын

Пікірлер: 71
@savdevv
@savdevv 4 ай бұрын
The 8 min vids continue! Keep it up Cody, Your onto something good here!
@allenbythesea
@allenbythesea 4 ай бұрын
good stuff, currently auth is some of the most unnecessarily complex stuff in software dev. This goes back towards simplification.
@codingwithjamal
@codingwithjamal 4 ай бұрын
@@allenbythesea Whats the complex form of auth?
@iraniannuclearprogram3382
@iraniannuclearprogram3382 4 ай бұрын
Simplification? Are you delusional? This is complete mess.
@allenbythesea
@allenbythesea 4 ай бұрын
@@iraniannuclearprogram3382 it is but its also way less complex than a lot of the stuff we have today. I am of the opinion that the insane complexity of auth systems these days makes them considerably less secure. Which is why this, though complex, is less complex then configuring / deploying a lot of the systems available today.
@codingwithjamal
@codingwithjamal 4 ай бұрын
@@iraniannuclearprogram3382 I was asking whats a more complex version if auth, this is simple to me
@MasterEd725
@MasterEd725 4 ай бұрын
Absolutely loved this video! It's short, concise, and straight to the point. Thanks for making such an informative piece so easy to understand. Great job Cody!
@shaked1233
@shaked1233 4 ай бұрын
There is no shorter, better, more straight to the point, lucia auth implementation video than this. Thanks
@jitxhere
@jitxhere 4 ай бұрын
Cody thanks for this. I will extend this and make it fully functional like a complete auth email verification, password reset, 2 factor auth, google auth, GitHub auth and will add rate limiting
@inderjotsingh5868
@inderjotsingh5868 4 ай бұрын
bro , can you share the repo
@justinoconnell7307
@justinoconnell7307 4 ай бұрын
Great video, I got it up and running. I looked at the lucia docs few weeks back and couldn't be bothered to figure it out myself at the time
@BreuXBranco
@BreuXBranco 4 ай бұрын
You’ve been killing with these tuts my dude
@ItsLaxe
@ItsLaxe 4 ай бұрын
had to figure out lucia auth (with oauth) a few weeks back. it was a pain with the docs but overall the code is pretty simple, glad i set it up instead of relying on another auth library
@iraniannuclearprogram3382
@iraniannuclearprogram3382 4 ай бұрын
Now you rely on this messy auth library with completely braindead docs. Congrats
@kushyzee
@kushyzee 2 ай бұрын
​@@iraniannuclearprogram3382I see you in most comments trying to downgrade Lucia, are you paid to do this? Yeah, Lucia is a mess and nextAuth is awesome, nice take
@LDev00
@LDev00 Ай бұрын
@@iraniannuclearprogram3382which is free and customisable
@deepjyotideb1173
@deepjyotideb1173 4 ай бұрын
Finally! Been waiting for this for A while.
@SeibertSwirl
@SeibertSwirl 4 ай бұрын
Nice! An 8 minute video?!?! Sheeeeshhh! Love ya
@nickwoodward819
@nickwoodward819 3 ай бұрын
Not chaotic, this was good. Thanks.
@xJaKoBz
@xJaKoBz 4 ай бұрын
I really like these shorter videos!
@nianight
@nianight 4 ай бұрын
2:55 was very unfortunate cut. How did you fix that wrong type error?
@ga1az
@ga1az 3 ай бұрын
Delete the _: any export async function signup(formData: FormData){}
@LDev00
@LDev00 Ай бұрын
Cannot find name ‘signup’. Import it
@nasko235679
@nasko235679 4 ай бұрын
The 1 thing I don't like about Lucia is that it queries the DB every time you need to check for authentication. I guess that's not a Lucia issue, more of a DB Session issue, but if you're interracting with an api/trying to fetch data securely that's a lot of queries to make sure you get the data to the properly authenticated user every time.
@yonluc
@yonluc 4 ай бұрын
If you are fine with it , you can try to cache the result of the check for authentications for a short period of time (5mins).
@WebDevCody
@WebDevCody 4 ай бұрын
I think it’s an issue when it’s actually a measurable issue. If your server and database are close in proximity (which they should honestly be), we are talking milliseconds to look up a single session record. You can also use reddis
@SirMeowMeow
@SirMeowMeow 4 ай бұрын
Sounds like you just don't like sessions. Lucia can do stateless JWT too.
@nasko235679
@nasko235679 4 ай бұрын
@@SirMeowMeow I love sessions because they give you the ability to authorize users in real time unlike JWT tokens. I just don't know how bad it is for performance to have to do an additional query on every authorized request to the server. As Cody said, it's not an issue until it's measurable.
@hello19286
@hello19286 4 ай бұрын
This is a benefit in certain applications, especially ones that need a high level of security. Sometimes you want to ban users/hackers and instantly revoke their access. This becomes even more important for fintech.
@alexandergeorgesquire220
@alexandergeorgesquire220 2 ай бұрын
Much appreciated and please do make that library
@Fujiyama_Senju
@Fujiyama_Senju 2 ай бұрын
What colour theme is he using?
@ronny-andrebendiksen4137
@ronny-andrebendiksen4137 4 ай бұрын
You should write that library specifically for Drizzle and Next.js!
@aizen_tv1536
@aizen_tv1536 4 ай бұрын
You're gonna pay me for these additional 19s blud
@WebDevCody
@WebDevCody 4 ай бұрын
Please don’t hurt me
@northerncoder
@northerncoder 4 ай бұрын
Any chance you could attempt to create a convex adapter for Lucia. So far I have been unable to do so.
@WebDevCody
@WebDevCody 4 ай бұрын
join my discord and ask Daria, he has tried hooking convex up with lucia I think
@w_tchd0g
@w_tchd0g 2 ай бұрын
great video! ngl i still used next-auth cuz they got far better documentation that lucia... dont want to rely on yt videos for something important like auth... UPD: i use lucia now lol
@WebDevCody
@WebDevCody 2 ай бұрын
😆
@PeterSahanaya
@PeterSahanaya 29 күн бұрын
Lol now lucia is deprecated 😂
@joostschuur
@joostschuur 4 ай бұрын
Are there any advantaged of Next Auth at this point? Other than momentum? Looks like, thanks to artic, Lucia also has a ton of auth providers it can use.
@WebDevCody
@WebDevCody 4 ай бұрын
Because building all those login flows took me a lot of time and I’m still fixing small bugs in that repo. It’s nice having something that basically works out of the box. But I guess that’s what you mean by momentum
@ben-gibb
@ben-gibb Ай бұрын
Shouldn’t that validate requests be in the middleware?
@ben-gibb
@ben-gibb Ай бұрын
Sorry, serious question.. is it or no?
@PURPLECUT
@PURPLECUT 4 ай бұрын
does lucia do csrf for you? doesn't seem like it
@steiner1052
@steiner1052 4 ай бұрын
Thank you! one question.. What is the advantage of Lucia vs Next-auth?
@SirMeowMeow
@SirMeowMeow 4 ай бұрын
Lucia is far more customized but you must do more yourself.
@jeongjehoon2
@jeongjehoon2 4 ай бұрын
Next-Auth is totally shit. It's TOO opininated and abstracted for just auth. It makes you crazy when little quirks pops up that you cannot fix until NextAuth team fixes or manually edit them. Easier Usage = More Abstraction = Less Customization, Less Flexible
@Damien1990UK
@Damien1990UK 4 ай бұрын
Thank you for the videos. Currently going through the online auction app video and get stuck early on as apparently Next.js, drizzle/postgres and Auth.js don't get on well together with error messages like the one below appearing: Module build failed: UnhandledSchemeError: Reading from "cloudflare:sockets" is not handled by plugins (Unhandled scheme). Hopefully switching the auth to Lucia will help as had no problems before putting the auth in.
@PeterSahanaya
@PeterSahanaya 29 күн бұрын
And now lucia auth deprecated 😂
@AbuBakr1
@AbuBakr1 4 ай бұрын
Please Can we use Lucia in nextjs Middleware?
@naughtiousmaximus7853
@naughtiousmaximus7853 4 ай бұрын
Thank you a lot.
@Joey-o7p
@Joey-o7p 4 ай бұрын
Thanks!
@codingwithjamal
@codingwithjamal 4 ай бұрын
thank you
@rcpro81
@rcpro81 4 ай бұрын
yes!
@wobsoriano
@wobsoriano 4 ай бұрын
How to setup Clerk in 5 minutes? :p
@googoochu3923
@googoochu3923 4 ай бұрын
Im using kinde until authjs 5 is stable
@WebDevCody
@WebDevCody 4 ай бұрын
it'll be stable in 4 years
@kal.leroux
@kal.leroux 4 ай бұрын
sorry but I have to ask, what type of content do you want to make because what you are doing now is just so average and doesn't have any vision or goal you are just doing thing that doesn't have or give a plus to your subscriber. I am not trying to make fun of you or anything else it's just that I feel like what you are doing with this channel now is really different than what it was before ( before I was really feeling like you wanted to educate you viewer and help them become more senior )
@WebDevCody
@WebDevCody 4 ай бұрын
Thanks for the feedback! I’m just trying some new content honestly. At this point I’ve made so many videos that I’m a bit burned out, so these type of videos are fun to challenge myself and some comments I’m getting show people like the concise nature of the videos.
@iraniannuclearprogram3382
@iraniannuclearprogram3382 4 ай бұрын
Complete mess. A disaster. Is this some kind of curse in Javascript?
@cdbrw
@cdbrw 4 ай бұрын
keyboard sounds soooooo gooood 🫣
@WebDevCody
@WebDevCody 4 ай бұрын
Asmr
@fleetfoot9034
@fleetfoot9034 2 ай бұрын
@@WebDevCody what keyboard/switches are you using? love the sound
@josh.manders
@josh.manders 4 ай бұрын
> How to setup Lucia auth in Next.js (in 8 minutes) > video length: 8m20s Unsubscribed
@WebDevCody
@WebDevCody 4 ай бұрын
Math.floor rounding
@kyrregjerstad
@kyrregjerstad 4 ай бұрын
Would love to see what you would come up with for a auth library tailored for drizzle and nextjs! Getting Lucia to work with the Next middleware is also a huge pain 🥲
@engelshentenawy
@engelshentenawy 3 ай бұрын
does @node-rs/argon2 package work for you, trying to get it to work with sst v2, unsuccessfully ?
@WebDevCody
@WebDevCody 3 ай бұрын
I'm not using sst right now so I'm not sure
@AbuBakr1
@AbuBakr1 4 ай бұрын
Please Can we use Lucia in nextjs Middleware?
How I structure my next.js applications
23:19
Web Dev Cody
Рет қаралды 32 М.
How web applications are secured
19:54
Web Dev Cody
Рет қаралды 25 М.
PRANK😂 rate Mark’s kick 1-10 🤕
00:14
Diana Belitskay
Рет қаралды 6 МЛН
小路飞还不知道他把路飞给擦没有了 #路飞#海贼王
00:32
路飞与唐舞桐
Рет қаралды 75 МЛН
Car Bubble vs Lamborghini
00:33
Stokes Twins
Рет қаралды 38 МЛН
Кто круче, как думаешь?
00:44
МЯТНАЯ ФАНТА
Рет қаралды 1,8 МЛН
Lucia Auth is Getting Deprecated
9:13
Web Dev Cody
Рет қаралды 11 М.
How to self host a Next.js application (with Dockerfile overview)
13:13
Lucia Auth is Being Deprecated
8:57
Coding Garden
Рет қаралды 5 М.
the most important Next.js features to learn (in 8 minutes)
8:26
Web Dev Cody
Рет қаралды 58 М.
The Story of Next.js
12:13
uidotdev
Рет қаралды 584 М.
SvelteKit Authentication with Lucia & Prisma
23:46
Huntabyte
Рет қаралды 51 М.
Oh, Auth Doesn't Have to Suck?
7:16
Josh tried coding
Рет қаралды 66 М.
My Favorite Auth Library is Getting Deprecated
12:27
Ben Davis
Рет қаралды 18 М.
This Might Be My New Favourite Auth Library 🔥
13:25
developedbyed
Рет қаралды 31 М.
Next.js 15 Breakdown (Everything You Need To Know)
18:10
Web Dev Simplified
Рет қаралды 62 М.
PRANK😂 rate Mark’s kick 1-10 🤕
00:14
Diana Belitskay
Рет қаралды 6 МЛН