SvelteKit User Authentication With Auth.js | OAuth 2.0 Authentication

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ส.ค. 2024
  • 🎓 Join my learning platform for module based courses, learning exercises, and more: coderprep.com/
    In this video we go into the SvelteKit integration of Auth.js, building an entire authentication system allowing you to use any OAuth 2.0 service. I also show off how to get the access token of a user for a given service, allowing you to communicate with any APIs related to your given OAuth 2.0 service. I decided to use GitHub authentication for this video, but you can really use anything you want. Thanks for watching!
    Final project: github.com/coopercodes/svelte...
    REMINDER: The GitHub link wont work above unless you create a .env file like shown in the video.
    0:00 Project Showcase
    1:00 SvelteKit Setup (@auth/sveltekit)
    2:41 GitHub OAuth 2.0 Setup
    6:30 Adding TailwindCSS (svelte-add tailwindcss)
    7:50 Initializing Auth.js and SvelteKit (auth.ts)
    11:17 Login User With Auth.js and SvelteKit
    17:48 Show Logged In User
    19:20 Sign Out User With Auth.js and SvelteKit
    20:35 Get User Access Token For OAuth 2.0 Service
    23:05 Use User Access Token To Access APIs
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 15

  • @2u841r
    @2u841r 9 ชั่วโมงที่ผ่านมา

    VERY GOOD

  • @GamerTito21
    @GamerTito21 2 หลายเดือนก่อน +1

    This is literally the best and most didactic video I saw so far with authentication. I kinda knew how to do, but I was not understanding why I was doing those stuff lol, thank you very much!!

  • @Shijith1
    @Shijith1 หลายเดือนก่อน

    Thanks for this man!

  • @riigel
    @riigel 4 หลายเดือนก่อน +2

    more sveltekit!

  • @devgauravjatt
    @devgauravjatt 3 หลายเดือนก่อน +1

    ❤ thank you so much 🎉🎉

  • @lolzthegreat
    @lolzthegreat 3 หลายเดือนก่อน

    this helped a lot, thanks man :)

  • @deema11235
    @deema11235 หลายเดือนก่อน

    thanks

  • @7maciej7
    @7maciej7 3 หลายเดือนก่อน

    nice vid! it would be nice if you showed at the end of the video how to get rid of all the @ts-ignore's 😃

  • @thederpykrafter
    @thederpykrafter 4 หลายเดือนก่อน

    i got so excited to see a recently uploaded video on the subject ive been struggling with for weeks.. however ive yet again ran into another seemingly-ungooglable issue. i get a type error: invalid URL when attempting to load server data. back to the drawing board i guess.. im trying so hard to love svelte but i cant seem to get any practical use out of it aside from reusable components. any help would be appreciated.

  • @alexnova6239
    @alexnova6239 4 หลายเดือนก่อน +1

    session is empty when we run build preview? i have been struggling to fix this or i completely do no understand whats happening everything works fine in Dev but in build preview login success but no session is there?

    • @prajval37
      @prajval37 4 หลายเดือนก่อน

      I'm getting the same problem. Did you solve it?

  • @user-px7zi6ry3o
    @user-px7zi6ry3o 4 หลายเดือนก่อน

    can you create guide with credentials auth?

  • @naolfekadu6101
    @naolfekadu6101 3 หลายเดือนก่อน

    No mongo db? Am having tourble setting up with mongoose

  • @gdissleeping5719
    @gdissleeping5719 4 หลายเดือนก่อน

    can you show with password email im kinda stuck there

  • @MultiLeechCZ
    @MultiLeechCZ 22 วันที่ผ่านมา +1

    th-cam.com/video/ehmc1Zgu_EU/w-d-xo.html does not work with sveltekit 2 and svelte 5. There is not even anymore