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

preview_player
Показать описание
I feel like this video was a mess. hopefully you learned something. I'm going to make an example nextjs + lucia auth repo for people to clone now because these docs feel a bit chaotic.

Become a YT Members to get extra perks!

My Products

Useful Links
Рекомендации по теме
Комментарии
Автор

The 8 min vids continue! Keep it up Cody, Your onto something good here!

savdevv
Автор

good stuff, currently auth is some of the most unnecessarily complex stuff in software dev. This goes back towards simplification.

allenbythesea
Автор

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

ItsLaxe
Автор

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

heyjitendra
Автор

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!

MasterEd
Автор

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

justinoconnell
Автор

Finally! Been waiting for this for A while.

deepjyotideb
Автор

You’ve been killing with these tuts my dude

BreuXBranco
Автор

Nice! An 8 minute video?!?! Sheeeeshhh! Love ya

SeibertSwirl
Автор

There is no shorter, better, more straight to the point, lucia auth implementation video than this.
Thanks

shaked
Автор

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.

nasko
Автор

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.

DamienUK
Автор

Any chance you could attempt to create a convex adapter for Lucia. So far I have been unable to do so.

northerncoder
Автор

Thank you! one question.. What is the advantage of Lucia vs Next-auth?

steiner
Автор

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.

joostschuur
Автор

does lucia do csrf for you? doesn't seem like it

PURPLECUT
Автор

You should write that library specifically for Drizzle and Next.js!

ronny-andrebendiksen
Автор

Please Can we use Lucia in nextjs Middleware?

AbuBakr
Автор

You're gonna pay me for these additional 19s blud

aizen_tv
Автор

2:55 was very unfortunate cut. How did you fix that wrong type error?

nianight