Next Auth - JWT & Session Callback & How to Update User Session

Опубликовано: 31 Май 2026
на канале: Brett Westwood - Software Engineer
57,737
1.2k

My fav place to learn to code is Scrimba

Get 20% off a subscription with my link 👇
https://scrimba.com/?via=brettwestwood

In this video, I go over how to use the asynchronous callbacks of the JWT function and session function. This will allow you to use the JSON Web Token for your session data.

Also, I go over the update method provided by the useSession Hook. This allows you to update the session object.

Private 1 on 1 Help 👇
https://calendly.com/dabrettwestwood/...

Join my FREE Discord to talk and network about web development! 👇
  / discord  

Time Stamps
0:00 Intro
1:18 getServerSession and UseSession Overview
4:24 Explanation of how the callbacks work
5:49 Creating a custom property inside of Register Endpoint
10:47 Create the JWT and Session Callbacks
21:48 The Update() Method
27:52 Update the user in database
30:42 Outro