Oh, Auth Doesn't Have to Suck?

Sdílet
Vložit
  • čas přidán 13. 02. 2024
  • This auth library and all the utilities that come with it are seriously impressive work. It's cool to see a very different, less abstract approach to going about auth.
    -- sources
    primeagen interview: • ThePrimeagen: VIM (btw...
    lucia article: github.com/lucia-auth/lucia/d...
    -- my links
    saas: www.animate-code.com/
    newletter: www.joshtriedcoding.com/
    discord: / discord
    github: github.com/joschan21
  • Věda a technologie

Komentáře • 141

  • @codernerd7076
    @codernerd7076 Před 4 měsíci +173

    Auth without 3rd party! Need one full tutorial 😮

  • @branislavbrincko7237
    @branislavbrincko7237 Před 4 měsíci +167

    I hope this library gets much more attention because Nextauth’s decision to not support email password auth has been sooooo frustrating.

    • @tommysaucey6095
      @tommysaucey6095 Před 4 měsíci

      what about this fact ? you can actually use credentials with nextauth

    • @oleh1
      @oleh1 Před 4 měsíci

      what's the usecase of email password auth?

    • @daycred
      @daycred Před 4 měsíci +32

      It's so condescending. Even if you just want to enable in dev/staging or internal use, all of which are very valid use cases

    • @over9000andback
      @over9000andback Před 4 měsíci +33

      @@oleh1to not depend on a third party idp

    • @CoryTheSimmons
      @CoryTheSimmons Před 4 měsíci

      Auth companies hire (buy) these auth lib maintainers and then the auth libs go to 💩. Auth0 did it with Passport.js. Clerk is doing it with NextAuth.
      Basically, if you want a job in tech in 2024, just write a good OSS auth library and they are forced to hire you.

  • @3b00d09
    @3b00d09 Před 4 měsíci +13

    lucia is my love, really glad to see you made a video on it! im a big fan of the library

  • @user-of6ls2ng5l
    @user-of6ls2ng5l Před 4 měsíci +55

    The war between Prisma and Drizzle is even in the authorization video

  • @jodp
    @jodp Před 4 měsíci +2

    Just heard about this last week, glad to see you on top of this recent stuff!

  • @erics2133
    @erics2133 Před 4 měsíci

    Very interesting, and your comments really make me feel more comfortable with going with Lucia 3.0 vs AuthJS or rolling my own.

  • @manuelsanchezweb
    @manuelsanchezweb Před 3 měsíci +2

    We need a full tutorial on this!!! Great video, Josh!

  • @ThaumesD
    @ThaumesD Před 4 měsíci +4

    I really like this take! Good job explaining this!

  • @alasdairsmith0491
    @alasdairsmith0491 Před 4 měsíci +18

    I'm not sure we can discuss the concept of "abstraction" as either good or bad unless you have the context of the consumers of the abstraction. I appreciate your use of the phrase "right level of abstraction" as I think that starts to indicate that the appropriateness of the abstraction is very much a sliding scale.

  • @justindoane7482
    @justindoane7482 Před 4 měsíci +13

    Been also using lucia v3, love it!

  • @RonnieDenzel
    @RonnieDenzel Před 4 měsíci +15

    This is what makes me feel that next auth gets wrong,its implementation is too high level,I'm at least happy that this library strikes a balance
    Thanks Josh💯

  • @Gustavo-bi4hv
    @Gustavo-bi4hv Před 4 měsíci +51

    Yesterday I was studying NextAuth V5 and was a headache to implement a simple credentials sign-in feature. The documentation is horrible. It's just me or anyone else think that doc is horrible? I felt dumb.

    • @darwinnarro2889
      @darwinnarro2889 Před 4 měsíci +1

      It is. But is a really good tool if you know what are you doing

    • @alphhs5260
      @alphhs5260 Před 4 měsíci +14

      Yeah, the doc is pretty bad

    • @marvinkr
      @marvinkr Před 4 měsíci +12

      The worst doc in human history

    • @boniedwin
      @boniedwin Před 4 měsíci +3

      agree next auth docs is hell to read

    • @Gustavo-bi4hv
      @Gustavo-bi4hv Před 4 měsíci +3

      @@marvinkr Yeah. Cant remember any worse than that.

  • @JukkaPekkaKeisala
    @JukkaPekkaKeisala Před 3 měsíci +1

    I have tried Kindle, NextAuth and Clerk but haven't felt home in any of them. I like abstractions that Lucia seems to deliver. I will give a spin. Thanks for video.

  • @milos018
    @milos018 Před 4 měsíci +3

    "In the beginning you want results, in the end you want control" by someone on the internet. Works here too :)

  • @mettle_x
    @mettle_x Před 4 měsíci +4

    There's more to say about "Abstraction". Abstractions that don't give you granular controls can also be good if the things they're abstracting are **not intended to work with** for the most cases. Thus it sets up a recommended design pattern. Customization along with sane defaults doesn't work all the time. If you think about it, React is such an example of the abstraction. Monads can be regarded in the same category.

  • @adriablancafort
    @adriablancafort Před 4 měsíci

    Amazing! I will give it a try

  • @tylerdrabek1592
    @tylerdrabek1592 Před 4 měsíci +4

    Please for the love of God make a full deep dive turorial

  • @BeyondLegendary
    @BeyondLegendary Před 4 měsíci +6

    Impressive, very nice. let's see Paul Allen's auth.

  • @codinginflow
    @codinginflow Před 3 měsíci

    I've implemented Lucia auth today and I much prefer it over Next-auth. It doesn't force you into ugly design patterns (both backend & UI).

  • @MyGeorge1964
    @MyGeorge1964 Před 3 měsíci +1

    Dude, heard of Aceternity UI - it amazing

  • @mr.random8447
    @mr.random8447 Před 4 měsíci

    The benefit of higher level of abstractions in terms of UI library is if you need to enforce strong design constraints and consistency

  • @yousofscodingadventures
    @yousofscodingadventures Před 4 měsíci +1

    Banger video

  • @raymondmichael4987
    @raymondmichael4987 Před 4 měsíci

    I need full example with this, using different auth providers and linking user if they happen to have more than one provider 😊

  • @user-sn5ee1oi2v
    @user-sn5ee1oi2v Před 3 měsíci

    Josh, love your videos. I have a doubt. Is there still caching issue in NEXT JS 14 ? Does server actions resolve all these caching issues ?

  • @KSalvatore
    @KSalvatore Před 4 měsíci +2

    Good library need to try it to learn. I used next-auth and don't understand exactly how it works.
    And I kinda getting why non abstracts good. I recently learning prisma It is very easy.
    Can you do a comparison or explain how drizzle works from prisma users point of view.
    Thanks😊

  • @asadsalehumar1011
    @asadsalehumar1011 Před 4 měsíci

    exactly, the right abstraction!

  • @itsfarseen
    @itsfarseen Před 4 měsíci

    Bro you make so much sense ❤ youre the messiah we needed after being fed the enterprise bullshit for 20 years since the invention of Java.

  • @sureshmutluru4532
    @sureshmutluru4532 Před 4 měsíci +5

    Full tutorial please

  • @AlanDanielx
    @AlanDanielx Před 4 měsíci

    Lets give some love to Lucia

  • @manalavi
    @manalavi Před 2 měsíci

    This is great. Do they have the example / resources on how to use with fastify server. Need this to build it in my application.

  • @raymondmichael4987
    @raymondmichael4987 Před 4 měsíci +1

    There goes my auth stack; you sold it really well

  • @BhideSvelte
    @BhideSvelte Před 4 měsíci +7

    He is 19yrs old

  • @BhideSvelte
    @BhideSvelte Před 4 měsíci

    He is god i just love his work a lottt

  • @euanmorgann
    @euanmorgann Před 24 dny

    Been using next-auth for 2 years now and I'm tired of wasting days everytime I need to add a basic feature it doesn't support. Going to try and migrate to lucia today

  • @theether5993
    @theether5993 Před 4 měsíci

    I have seen this guy, before v1, when it used to be for sveltekit.

  • @neociber24
    @neociber24 Před 4 měsíci

    Now we need an abstraction over Lucia to support all: Password, Social, Passwordless, etc...

  • @namestarlit
    @namestarlit Před 2 měsíci

    less abstraction, huh... I like it

  • @irfanulislamjishan4416
    @irfanulislamjishan4416 Před 4 měsíci

    You should make one auth tutorial without any third party library.

  • @a1x5h04
    @a1x5h04 Před 4 měsíci

    Every Josh Thumbnail: 😏

  • @bullettime2808
    @bullettime2808 Před 3 měsíci

    I would love to see a tutorial on Authentication that works in both Next js and public clients like SPAs and mobile apps like React Native kr Flutter without using a paid service like Clerk

  • @noelpena4567
    @noelpena4567 Před 4 měsíci +4

    Am I wrong in thinking that abstraction is good for features like Auth? I understand that it depends on the project/scenario but wondering if I am missing something. I use third-party Auth providers that provide abstraction because I don't necessarily want to know or handle everything under the hood. Thoughts?

    • @aldierygonzalez7249
      @aldierygonzalez7249 Před 4 měsíci +2

      I agree, but there are so many times where you need to do things where the best solution would be to modify the authentication flow. When these situations happen, I think it gets to a point where abstractions feel like a barrier to your solution rather than a helper. Things like syncing a database from an external Api on login gets really hard when you don't have access to your own login function.

    • @antares-the-one
      @antares-the-one Před 3 měsíci

      try implementing auth with normal error handling when errors are on the credentials page, not on complete separate one. What kind of ux is that?

  • @ChichaGad
    @ChichaGad Před 4 měsíci +2

    Great video Josh!
    I have to admit that Auth.js is cancer, especially their docs are a huge chaotic contradictory mess
    Regardless of whether v4 or their latest v5
    I was waiting for Lucia 3 to come out because this version doesn't force the usage of an adapter, and I'm glad they brought this change
    For now I can safely say I'm happy with switching to Lucia, especially because their abstraction still gives me full control of how, why, when, and where I want something

  • @olivermarkey4441
    @olivermarkey4441 Před 4 měsíci

    Dude I saw this on Twitter and I’m so annoyed bc I just implemented nextAuth but if this is good I’ll switch- I saw a boilerplate that includes stripe pre built which is amazing.

  • @supermamoru
    @supermamoru Před 4 měsíci

    Authentication is always a pain when I have to recode it every single time 😂

  • @cb73
    @cb73 Před 4 měsíci

    I'm sure the folks at Radix are stoked you said Shadcn is just a collection of primitives. :-D

  • @lasindunuwanga5292
    @lasindunuwanga5292 Před 4 měsíci

    That introduction part is so true and sad
    .NET has such an annoying part. I am so mad at it. It has abstracted out everything so it cannot be modified for our special use cases. Instead build it from the ground 0

  • @xya6648
    @xya6648 Před 4 měsíci +1

    The title got me cracking up! OhAuth -> OAuth lmao

    • @Chris...S
      @Chris...S Před 4 měsíci

      Wondered how many actually got that

  • @riolly
    @riolly Před 3 měsíci

    Cool

  • @Gustavo-bi4hv
    @Gustavo-bi4hv Před 4 měsíci +2

    Please, do a full tutorial with credentials and OAuth login. It would be amazing!

  • @kathanmehtaa
    @kathanmehtaa Před měsícem

    what auth do u use josh? Clerk, Lucia, Nextauth ?

  • @dhaw
    @dhaw Před 4 měsíci +4

    single guys rocks 🤣

  • @salihyil2
    @salihyil2 Před 4 měsíci

    How do you learn so much stuff, and when do you learn it?

  • @JD-qo9wk
    @JD-qo9wk Před 3 měsíci

    Possible to use Lucia with React Front-End + Python FastAPI Backend?

  • @maxgarcia4547
    @maxgarcia4547 Před 4 měsíci

    Vue Composition API flashbacks

  • @anlukinha8764
    @anlukinha8764 Před 4 měsíci

    It is basically a Shadcn for Auth.

    • @anlukinha8764
      @anlukinha8764 Před 4 měsíci

      ps.: I wrote this comment before shadcn appeared on the video lol

  • @anonanon7368
    @anonanon7368 Před 3 měsíci

    full tutorial pls

  • @dan_____
    @dan_____ Před 4 měsíci

    NextAuth was like "we cba to add credentials authentication" and they called it a feature 🤣

  • @filipniklas
    @filipniklas Před 4 měsíci

    Supertokens

  • @mirozxl
    @mirozxl Před 4 měsíci +3

    one thing issue with lucia and others like auth js is lack of proper resources and documentation. Would love a tutorial on lucia

  • @prodfragment
    @prodfragment Před 4 měsíci

    Interesting. NextJS was smoking crack while creating NextAuth. From a quick glimpse, I can tell it's better

  • @Michael-lg6nv
    @Michael-lg6nv Před měsícem

    Is it also possible to use Lucia Auth without Typescript?

  • @itsfarseen
    @itsfarseen Před 4 měsíci

    0:38 Why is he single 😢

  • @dnbull
    @dnbull Před 4 měsíci

    Lucia made by a teenager, legendary!

  • @iangithinji1452
    @iangithinji1452 Před 2 měsíci

    Is Lucia better than Clerk? Someone answer

  • @alastairtheduke
    @alastairtheduke Před 4 měsíci

    I think this is generally a good idea. However, in the OAuth case, you really have to know how the OAuth flow works...and to be honest, I think this is actually the biggest hurdle to implementing OAuth.

    • @nazarshvets7501
      @nazarshvets7501 Před 4 měsíci

      Yea, and on the other side is framework-dependent poorly documented opinionated library(micro-framework). Learn flow once, implement everywhere, don't be a frameworker

  • @ShekarGoud8055
    @ShekarGoud8055 Před 4 měsíci

    “I have reading comprehension and the attention span of a second grader”
    Relate 100

  • @jovrx
    @jovrx Před měsícem

    Seems like no one got the joke in the title? 😄

  • @jitx2797
    @jitx2797 Před 4 měsíci +1

    I just love lucia. It works. It also supports Astro.

  • @paw565
    @paw565 Před 4 měsíci

    I just use django ❤

  • @xav_624
    @xav_624 Před 4 měsíci +2

    Great content. Lucia is awesome

  • @AbhiShake-pl3cf
    @AbhiShake-pl3cf Před 4 měsíci +2

    Better than nextauth? I dont really like clerk

    • @christopherkapic
      @christopherkapic Před 4 měsíci

      It's a bit more work than NextAuth but overall I think it's better. NextAuth is easy because it's heavily abstracted, which can be a bad thing. Also NextAuth is in kind of a weird place wrt development lifecycle and documentation.

  • @nasko235679
    @nasko235679 Před 10 dny

    AuthJS's creator is an incredibly arrogant person. I had a chat with him in the authJS discord asking why it's so difficult to implement db session credentials auth and why there's zero documentation on the subject and he responded by saying "they don't like db session based auth and that's why there will never be documentation on it but authJS is the GREATEST MOST FLEXIBLE library ever made so if you were smart enough you can easily implement db session auth on your own". So in short he just "skill-issued" me and bragged about how good authJS is.

  • @samislam2746
    @samislam2746 Před 4 měsíci

    We call this a headless library

  • @mubin-ansari
    @mubin-ansari Před 4 měsíci +1

    Wake up babe, new auth library just dropped

  • @greatnile
    @greatnile Před 3 měsíci

    am I too old or this is the modern rewrite of passportjs?😂

  • @aaronwolbach9880
    @aaronwolbach9880 Před 4 měsíci

    You shouldn't implement authentication. You should buy it.

  • @iAbhijeetShukla
    @iAbhijeetShukla Před 3 měsíci

    next-auth is crap
    next-auth is crap
    next-auth is crap
    next-auth is crap
    next-auth is crap
    next-auth is crap

  • @xbozo.
    @xbozo. Před 4 měsíci

    imo nextauth is shit to deal with, they turn things much more complicated then they should be

  • @AkashLayal
    @AkashLayal Před 4 měsíci

    Second. ❤

  • @codewithmastery
    @codewithmastery Před 4 měsíci

    first

  • @user-ru3jc8tf1x
    @user-ru3jc8tf1x Před 2 měsíci

    This tool sucks, i prefer auth0 or eartho