Тёмный

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

Brett Westwood - Software Engineer
Подписаться 8 тыс.
Просмотров 45 тыс.
50% 1

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 👇
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

Опубликовано:

 

22 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 163   
@satvik0099
@satvik0099 11 месяцев назад
this video is wonderfull sir , i have watched many a videos related to next auth and was struggling with it since 1 month but after seeing your 2 videos all my doubts came to an end , this is the best video on internet on next auth , thank you soo much sir
@ergo6450
@ergo6450 11 месяцев назад
Finally I found a way to do this, I searched everywhere but couldn't find it. Thanks, awesome video.
@shumit
@shumit Год назад
Thank you so very much !! Your "The Ultimate Guide to Next Auth" video and this one are SUPER for beginners and probably the most thorough content on RU-vid on Next-Auth. May be, if you have time and energy, sometime in future, a nice relaxed discussion, or a nifty little series on JWT + cookies + session + authentication + authorization + database session etc especially in light of NextJS + NextAuth would be fantastic. I guess this is how we beginners are !! Greedy !! :-). Once more, MAGNIFICENT, FABULOUS. THANK YOU SO VERY MUCH !!!
@brettwestwooddeveloper
@brettwestwooddeveloper Год назад
Thank you for tuning in! I would be glad to make a video along those topics.
@henrymunoz2035
@henrymunoz2035 Год назад
This is my second tutorial from Brett, this was amazing thanks so much. You make wath seems very complicated and you simplify it for us. Thanks again
@brettwestwooddeveloper
@brettwestwooddeveloper Год назад
Thank you for the kind words! I am glad you are tuning in!
@ericwinkdev
@ericwinkdev 10 месяцев назад
Thank you for being (seemingly) the only person anywhere to explain the callbacks in NextAuth. This was a huge help!
@brettwestwooddeveloper
@brettwestwooddeveloper 10 месяцев назад
No worries! You are welcome!
@richardhulse9328
@richardhulse9328 2 месяца назад
This is the best video on callbacks I have seen. Thank you for walking through it in such a systematic manner.
@brettwestwooddeveloper
@brettwestwooddeveloper 2 месяца назад
No problem! Appreciate the feedback!
@remarkablejames
@remarkablejames 11 месяцев назад
man you're doing great job. Nextjs has no many tutorials out there that highlight things as you do. Highly appreciated!
@brettwestwooddeveloper
@brettwestwooddeveloper 11 месяцев назад
Thank you!
@AbhithShaji
@AbhithShaji 3 месяца назад
Great video man. Just what i needed. Everything explained clearly and perfectly.
@davewilson83
@davewilson83 10 месяцев назад
You just earned a new follower bro. I have been struggling with session updates for a while but you just made it look so easy. Thanks ❤
@brettwestwooddeveloper
@brettwestwooddeveloper 10 месяцев назад
Thank you so much for the follow!
@realmers0x
@realmers0x 4 месяца назад
Thank you so much for doing such high quality content around nextauth callbacks!! Helped me so much.
@brettwestwooddeveloper
@brettwestwooddeveloper 4 месяца назад
No problem! Thank you for tuning into my channel!
@YorchCb
@YorchCb 7 месяцев назад
Much better than other tutorials, thank you very much !
@jackfrost6997
@jackfrost6997 10 месяцев назад
Thanks man ! it really helped a lot. No other tutorial regarding callback with mongo is out there. Would love to see more like these.😃
@brettwestwooddeveloper
@brettwestwooddeveloper 10 месяцев назад
Appreciate it! Thanks for tuning in!
@fadlo1580
@fadlo1580 11 месяцев назад
Honestly, this is the best video ever on this topic. I've been struggling with NextAuth - "in my opinion, the documentation is either bad or I'm just dumb" - but it was explained so well! Subscribed.
@brettwestwooddeveloper
@brettwestwooddeveloper 11 месяцев назад
Thank you so much!
@st7171
@st7171 10 месяцев назад
Yea Documentation isn't helping that much, but utubers are there for us 🥰
@sheharwazir
@sheharwazir 10 месяцев назад
Best of the best video and teaching style. Thumbs up. You solved my issue. Best regards
@brettwestwooddeveloper
@brettwestwooddeveloper 10 месяцев назад
Glad it helped!
@nestofbleu4094
@nestofbleu4094 9 месяцев назад
Thank you, you just help me solve my problem on adding additional session.
@brettwestwooddeveloper
@brettwestwooddeveloper 8 месяцев назад
Happy to help!
@akinloludavid3
@akinloludavid3 2 месяца назад
This tutorial literally just saved my life
@tsegaamanuel5907
@tsegaamanuel5907 5 месяцев назад
You actually cooked with this tutorial no other tutorial like this.
@ilirbajrami2902
@ilirbajrami2902 Месяц назад
Dude, this earned you a subscribe, and i still didn't finish the video. Thanks!
@brettwestwooddeveloper
@brettwestwooddeveloper 28 дней назад
Thank you so much for the sub! Really appreciate it!
@fakn9159
@fakn9159 8 месяцев назад
Thanks for your great content! You're doing a great job at explaining. keep going :)
@brettwestwooddeveloper
@brettwestwooddeveloper 8 месяцев назад
Thank you! I will!
@krishnaTiwari851
@krishnaTiwari851 9 месяцев назад
thanks . that's the thing iam looking for and i got it after 3 days of search
@bernardstein1651
@bernardstein1651 11 месяцев назад
bravo couldn't navigate next-auth in the app directory without you
@brettwestwooddeveloper
@brettwestwooddeveloper 11 месяцев назад
Thank you! Glad I could help you out there!
@DiegoRodriguez-ms3hz
@DiegoRodriguez-ms3hz 10 месяцев назад
Perfect video, just what i looking for!
@brettwestwooddeveloper
@brettwestwooddeveloper 10 месяцев назад
Awesome! Thanks for tuning in!
@emmanueladufo
@emmanueladufo 11 месяцев назад
wish i could like this vid a hundred times.Thanks Brett🙌
@brettwestwooddeveloper
@brettwestwooddeveloper 11 месяцев назад
Glad you liked it!
@FaustinoVasquezLimon
@FaustinoVasquezLimon 11 месяцев назад
Great, I'm learning nextjs with these videos I already took a big step
@brettwestwooddeveloper
@brettwestwooddeveloper 8 месяцев назад
Awesome! Thanks for the sub!
@user-hc9yn2eu8p
@user-hc9yn2eu8p 11 месяцев назад
This video helped me a lot. I appreciate it
@yunuenmoncada
@yunuenmoncada 10 месяцев назад
Thank you man! you've saved me today!
@j7coder
@j7coder 5 месяцев назад
Good job broh! Great content!
@NOT_TON_Fan
@NOT_TON_Fan Год назад
The Complete T3 Stack Course would be game changing!
@fadlo1580
@fadlo1580 11 месяцев назад
strongly agree
@parhamtavakolian7562
@parhamtavakolian7562 8 месяцев назад
Thanks. this video really helps me
@brettwestwooddeveloper
@brettwestwooddeveloper 8 месяцев назад
No problem! Glad I could help you out
@JimMTVVlogs
@JimMTVVlogs 11 месяцев назад
Amazing video! I hope you create like a full admin dashboard tutorial using the credentials provider
@facundocarreno8956
@facundocarreno8956 4 месяца назад
thanks for the video , from argentina
@daytatech-youtube
@daytatech-youtube 7 месяцев назад
Great explanation, thank you!!!!
@brettwestwooddeveloper
@brettwestwooddeveloper 7 месяцев назад
You're very welcome!
@harithmu
@harithmu 6 месяцев назад
amazing video king. earned a subscriber👌👌
@brettwestwooddeveloper
@brettwestwooddeveloper 6 месяцев назад
Thank you so much!
@kelebaido6563
@kelebaido6563 Год назад
Well done video, I've learnt a lot from it.
@brettwestwooddeveloper
@brettwestwooddeveloper Год назад
Thank you!
@JonathanKila
@JonathanKila 2 месяца назад
Thanks!
@rockNbrain
@rockNbrain 9 месяцев назад
nice job! tksss a lot!
@brettwestwooddeveloper
@brettwestwooddeveloper 9 месяцев назад
No problem! Thanks for tuning in!
@visinigiri-aditya
@visinigiri-aditya 8 месяцев назад
Its Really Helpful video for me
@brettwestwooddeveloper
@brettwestwooddeveloper 8 месяцев назад
Awesome! Glad I could help you out!
@tsegaamanuel5907
@tsegaamanuel5907 5 месяцев назад
Big help
@user-dg7il7dj6k
@user-dg7il7dj6k 7 месяцев назад
Your video helped me a lot. thank you In my program, I can retrieve sessions from ssr and csr, and update session information through update() in csr. Is there a way to update the session in ssr?
@danielsetiawan8633
@danielsetiawan8633 6 месяцев назад
omg this video saving me
@brettwestwooddeveloper
@brettwestwooddeveloper 6 месяцев назад
No problem Daniel! Glad I was able to help you out! Any suggestions for more content you would like to see?
@siosaiafonua9286
@siosaiafonua9286 8 месяцев назад
how do you pass data from the login form to the signIn callback?
@shivpratik
@shivpratik 8 месяцев назад
Thank you for explaining the callback functions it helped me in my project! Can you also make a video on "Remember Me" functionality with Next Auth?
@brettwestwooddeveloper
@brettwestwooddeveloper 7 месяцев назад
Glad I could help you and I can look into it
@phongngo315
@phongngo315 10 месяцев назад
Thanks bro for very helpful video. But I want return accessToken for middleware authentication, how can I achieve it?
@LeandroAuzier
@LeandroAuzier Месяц назад
i tried do the same, but when i tried to pass phone number on async jwt() passing like: phone: user.phone i got error like this: Property 'phone' does not exist on type 'User | AdapterUser'. Property 'telefone' does not exist on type 'User'.ts(2339) any i dont understande why cause i am confirmed get all data i need on user
@rezakhani8627
@rezakhani8627 6 месяцев назад
Hello, I am developing the front-end of a project with Next.js, but the back-end of the project is in Django. I want to know if I can use NextAuth for authentication without causing any issues with the Django back-end? Also, could you advise me on whether I should store the token in a cookie or use NextAuth? Please guide me.
@pongtswaila7922
@pongtswaila7922 11 месяцев назад
any extension you use in the console? i can't find it in the console
@matheuspiegas
@matheuspiegas 3 месяца назад
man, can u please teach me how to get the jwt token genereted by next in account parameter? mine is always undefined
@vitya.obolonsky
@vitya.obolonsky 9 месяцев назад
How create custom login with email and pass only?
@yigitruzgaruzun7289
@yigitruzgaruzun7289 6 месяцев назад
You are perfect
@maynardejoseph3674
@maynardejoseph3674 4 месяца назад
legend
@brettwestwooddeveloper
@brettwestwooddeveloper 4 месяца назад
Thank you!
@jaygaming_
@jaygaming_ 6 месяцев назад
How do you console log so fast?
@devs_nazmul
@devs_nazmul 11 месяцев назад
ahh very nice if someone just change the token name and update this, then what happen? rather then using pure id name, jwt isn't better? so anyone can't see the user id? the user id is available on the client without encoding. am i wrong?
@VLADICA94KG
@VLADICA94KG 9 месяцев назад
Thanks for the great content! I really appreciate it. I have one question when updating the name field on line 72 in JWT callback function @29:24. I expected that the return block on line 64 would prevent the update from happening and would return token before even reaching the database. Do you know why that return didn't happen at all on line 64, but further processing happened on line 72? Thanks
@brettwestwooddeveloper
@brettwestwooddeveloper 8 месяцев назад
Hey Vlad thanks for the sub! And honestly I have no clue why
@hichamahendam3097
@hichamahendam3097 2 месяца назад
Great job, how to update adress and name ?
@jellyfish1772
@jellyfish1772 7 месяцев назад
this is a great video. you should have used typescript though!
@brettwestwooddeveloper
@brettwestwooddeveloper 7 месяцев назад
Next time!
@syedbilalchand1766
@syedbilalchand1766 3 месяца назад
Refresh tokens how
@wiktorukaszenko8737
@wiktorukaszenko8737 Год назад
I have a question about managing the database using the update function. It works well if we want to update one value in the user model. However, if I want to change once a name, once an address, and another time a property in a completely different model, the update function will not work. For database management, isn't it better to create API endpoints that are called by fetch? The data would be retrieved using useSWR, updated using fetch (POST, PUT or DELETE), and only the user ID would be contained in the session object. Am I right?
@brettwestwooddeveloper
@brettwestwooddeveloper Год назад
yes you are right, I think the update function can only update the session data. If you want to update anything in the session data, like name, email etc. you can use update. If you want to update a completely different model then you won't use update and do as you stated.
@lexsemenenko
@lexsemenenko 8 месяцев назад
Using NextAuth EmailProvider and trying to set a mergeLocalCartToServer: true flag on session during initial signin. Neither signIn nor JWT callbacks are triggered, only session. How can I set it only on initial signin? Any guidance is super appreciated.
@brettwestwooddeveloper
@brettwestwooddeveloper 7 месяцев назад
I honestly have no clue
@gerkim3046
@gerkim3046 4 месяца назад
this is super helpful, thanks a lot. how to fix typescript errors since it shows errors trying to accept my custom properties in the useSession() hook or getServerSession, ```Property 'type' does not exist on type '{ name?: string | null | undefined; email?: string | null | undefined; image?: string | null | undefined; }'.```
@brettwestwooddeveloper
@brettwestwooddeveloper 4 месяца назад
That error is due to the session object only having the properties of the name, email and image by default. Are you trying to add another value on the jwt token?
@jesustzinon
@jesustzinon Год назад
Hi, I have some doubts about using next-auth, what if i want to have an external api? I dont see a way of making the authorization for that external api routes using the jwt generated in the client-server in a simple wa ,maybe sending the user and checking if exist in the db in a middleware in the node external server but i dont think is a good practice, is there any way of generating the jwt on the external api and refresh it and keep using next auth? I ask this bc in the future I dont know if i will have a mobile app, and leave all api responsabilities to next.js doesnt seem to be that good
@brettwestwooddeveloper
@brettwestwooddeveloper Год назад
honestly that is a good question, and I don't know if they do. I know they are constantly working on new features and they are working on the new docs as well
@seanharricharan9191
@seanharricharan9191 11 месяцев назад
After initial login, I want to redirect the user to a form to fill out additional information, what would be the best way to implement that? By using a middleware that calls after the initial login or can I do that with the callback?
@brettwestwooddeveloper
@brettwestwooddeveloper 11 месяцев назад
thanks for tuning in and the best way to redirect after a sign in would be to define it in the catch all route. This is going to be an option called pages. It would look something like this. pages: { signIn: "/dashboard" }, this will redirect every sign in to the dashboard page
@user-ek7pw7ds6x
@user-ek7pw7ds6x 10 месяцев назад
If you refresh the page at 21:27 then the "id" and "address" properties will be gone from the "user" object. But they'll be added again if you click on a different browser tab and then return the the browser tab containing the app. Anyone know how to preserve those new properties on the session even after a page refresh? I've been struggling with this for a few days...
@user-ek7pw7ds6x
@user-ek7pw7ds6x 10 месяцев назад
Update: fixed it. It works perfectly with the SessionProvider you're using in this video. I was using `const session = await getServerSession()` to get the session that was passed to the SessionProvider wrapping my app which apparently is incorrect.
@clipzzy02
@clipzzy02 7 месяцев назад
I've got an error. Even though user is logged in session returns undefined, im using it in serverside component
@brettwestwooddeveloper
@brettwestwooddeveloper 7 месяцев назад
ummmm, can you send me your code and I can review it. Message me in Discord group
@leof240
@leof240 5 месяцев назад
thanks for the tutorial. it was very helpful. however, I cannot make the getServerSession method to work. it returns only the out of the box properties. any pointers? thanks in advance
@brettwestwooddeveloper
@brettwestwooddeveloper 5 месяцев назад
No problem. So, is it working client side when using useSession?
@leof240
@leof240 5 месяцев назад
@@brettwestwooddeveloper yes. it's working perfectly client side but server side returns only the default properties, so for example, the role property that I set in the callback is not shown in the getServerSession
@leof240
@leof240 5 месяцев назад
@@brettwestwooddeveloper actually I was able to make it work setting additional properties the javascript way and not the react way (with ...session, etc.)
@adityanarayanrai7689
@adityanarayanrai7689 Год назад
Okay but how will you update the session data from database. Let's say I have a property user_roule on User which is changed by admin. I would like to update the session data and see fi the role is changed.
@brettwestwooddeveloper
@brettwestwooddeveloper Год назад
depends on which ORM or database you are using. prisma.user.update, etc...
@prasanthsainandyala4897
@prasanthsainandyala4897 8 месяцев назад
hey, you have done for credentials provider right, can we do it for other providers like google and how?
@brettwestwooddeveloper
@brettwestwooddeveloper 8 месяцев назад
I have tried the update function for Google and it did update in the database but whenever I logged in with the Google Provider, no matter what I did. It took the name and email from the Google Provider. So, I don't think the updater function works on the google Provider. I would assume the same with others. However, you can use the JWT and Session callbacks for all providers. Hope this answer was clear.
@shubhamnagar5241
@shubhamnagar5241 11 месяцев назад
do you have a github repo
@vishwa_offl
@vishwa_offl Год назад
Great ❤
@brettwestwooddeveloper
@brettwestwooddeveloper Год назад
Thank you!
@natanuczak2640
@natanuczak2640 9 месяцев назад
Very nice video bro😉. Which version of next are you using? have a problem with this error: async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server. I think it may be couse becouse you pass session as an prop in provider but you didn't use it. I check that I can't wrap server component by client side component. I will be very grateful for your answer
@brettwestwooddeveloper
@brettwestwooddeveloper 8 месяцев назад
Yes I am using next.js 13 and the that error is specific to version 13 because client components can't have server functions inside of them. Is it letting you know which component the error is on?
@natanuczak2640
@natanuczak2640 8 месяцев назад
@@brettwestwooddeveloper thank you for your respond. I have already resolved this error. I made a dumb mistake😉
@seanharricharan9191
@seanharricharan9191 Год назад
Great Video! The only question I have is Why do you need the session callback if the jwt strategy is used? Because isn't the jwt sent to the client itself as a cookie to manage state?
@brettwestwooddeveloper
@brettwestwooddeveloper Год назад
You need the session callback because the JWT callback only updates the JWT in the backend. You need to send the JWT to the session. You can't manage the session object without it.
@seanharricharan7602
@seanharricharan7602 Год назад
@@brettwestwooddeveloper understood, I had a feeling this was how it worked but wasn't 100% sure, Thank you!
@haihong79
@haihong79 8 месяцев назад
I am doing the nextAuth, but when I refresh the page, the session is lost. Can you show me how to fix it?
@brettwestwooddeveloper
@brettwestwooddeveloper 8 месяцев назад
Can I see more of your code to help you out?
@dissatisfaction
@dissatisfaction 7 месяцев назад
with the logic you created for updating the user session, is it safe? next auth docs state that the value should be validated, but im not entirely sure how to do that. i heard a user can change any session value if not
@dissatisfaction
@dissatisfaction 7 месяцев назад
or is the "&& session?.name" in the trigger if statement the validation? does that check to make sure only the name can be updated?
@OnlyJavascript
@OnlyJavascript Год назад
I'm a bit confused about the order in which I should watch the authentication tutorials. Could you please provide an index of all the tutorials?
@brettwestwooddeveloper
@brettwestwooddeveloper Год назад
I would recommend watching the Credentials Provider video then this one.
@OnlyJavascript
@OnlyJavascript Год назад
@@brettwestwooddeveloper thank you so much.
@aryaprima6626
@aryaprima6626 11 месяцев назад
Thank you
@brettwestwooddeveloper
@brettwestwooddeveloper 11 месяцев назад
You are welcome!
@souravmajumder4630
@souravmajumder4630 Месяц назад
Can you share the source code?
@successoronyemaechi
@successoronyemaechi Год назад
Amazing! video. Is there no way to logout user on the server side? I've read the documentation and made a lot of research still no where to find that solution, please any solution or work around? I will really appreciate.
@brettwestwooddeveloper
@brettwestwooddeveloper Год назад
I don't think there is, you can create a button component this is client side and just import into your server side file.
@successoronyemaechi
@successoronyemaechi Год назад
@@brettwestwooddeveloper Wow! Thanks, I will give it a trial.
@kemoboy
@kemoboy 8 месяцев назад
I have a dilema. Authentication is not really my strongest point, and I fail to see how can I solve the problem I have. I have an external API which gets called from the app, mostly for storing files and some other things... How can I use the token provided by the Next Auth to authenticate on that API. And how can I invalidate a token, if let's say the token gets stolen. I'm trying to understand how refresh tokens works, but I'm not really understanding anything. And yes, I need to use the username / password, not a third party service, since this is for a small company, where only thier employees needs acces to it. I used firebase until now, but I'm rewrinting it and they want to drop any external service dependecy.
@brettwestwooddeveloper
@brettwestwooddeveloper 7 месяцев назад
Can't you check against the database and use the getServerSession provider which is server side code?
@WM-fz5si
@WM-fz5si Год назад
Hey Brett very useful video!💯 Also can you make video including accessToken and refreshToken for authorization
@brettwestwooddeveloper
@brettwestwooddeveloper Год назад
I can research it but I think its very similar to what I did in this tutorial
@WM-fz5si
@WM-fz5si Год назад
@@brettwestwooddeveloper Hey brett the data which we are accessing through session is also visible in network tab when we inspect. So it that safe?? Because I am passing accessToken in it for authorization? What is your view on it?
@brettwestwooddeveloper
@brettwestwooddeveloper Год назад
@@WM-fz5si you shouldn't pass anything secret into session. However, I think I have seen people pass that into session
@WM-fz5si
@WM-fz5si Год назад
@@brettwestwooddeveloper than which method will be best to get the accessToken??
@nasko235679
@nasko235679 2 месяца назад
How do I implement real-time user roles with credentials provider? I have set up my db's UserModel to accept a role Enum consisting of "user","mod" and "banned" but the issue is once the jwt token gets sent to the user even if I change the user's role server-side, they still hold on to their old role via the token. The only way that I've found out to work is to fetch the user from db every time they access the protected page but that's neither scalable nor practical in any way. Real-time role management is important in a lot of website types (forums, online games etc) and I have no idea how to do it (and auth js's documentation is not helping at all).
@brettwestwooddeveloper
@brettwestwooddeveloper 2 месяца назад
You should be passing the role from the JWT to the session object. It should be changing based on the new role if you do it like this.
@nasko235679
@nasko235679 2 месяца назад
@@brettwestwooddeveloper It's changing only when the user reauthenticates, not in real time.
@brettwestwooddeveloper
@brettwestwooddeveloper 2 месяца назад
@@nasko235679 Does it stay changed after they reauthenticate?
@nasko235679
@nasko235679 2 месяца назад
@@brettwestwooddeveloper Yes, the issue is that once the token is issued and the user has their role inprinted in it, you can't force them out so even if you decide to ban them (by simply changing their role to "banned") it won't reflect in their experience at all unless the token actually has an expiration mechanism (like make the token expire every 5 minutes and combine it with a refresher token so the user doesn't get logged out) however there's 0 documentation about that because..well because authjs documentation is utter s*!t.
@brettwestwooddeveloper
@brettwestwooddeveloper 2 месяца назад
@@nasko235679 ahh i see. Yes I have never implemented it like you are explaining. I would then just set the role to the user in the database and query it that way. Of course, this isn't ideal but will work
@user-of8kw9si9q
@user-of8kw9si9q 8 месяцев назад
What extension advices you the code?:)
@user-of8kw9si9q
@user-of8kw9si9q 8 месяцев назад
tabnine?
@brettwestwooddeveloper
@brettwestwooddeveloper 8 месяцев назад
Github copilot. It's $9.99/month. USD
@yasinmahmudmazid-bl3fz
@yasinmahmudmazid-bl3fz Год назад
@brettwestwooddeveloper, Thank you for providing a amazing tutorials, I am very grateful to you if you make another tutorial like how to reset and forgot password by email sending,Thanks again
@elithelateraluz1849
@elithelateraluz1849 7 месяцев назад
source code, sir?
@divajuni0406
@divajuni0406 9 месяцев назад
why my session to be null when page refresh ?
@brettwestwooddeveloper
@brettwestwooddeveloper 9 месяцев назад
Thanks for watching and to help diagnose your problem I would need more information.
@divajuni0406
@divajuni0406 9 месяцев назад
@@brettwestwooddeveloper after login success my page redirect to dashboard, and on dashboard page i console.log using useSession and i get the token from next auth, but when i refresh the page on dashboard the console log useSession token to be null, can you help me this issue
@divajuni0406
@divajuni0406 9 месяцев назад
And here i hit login api and the response of the api is jwt token only
@nslookup2011
@nslookup2011 6 месяцев назад
dude, good video about callback, but at the very beginning I thought you are going to teach us aerobic dancing...
@user-wh8py6xb2t
@user-wh8py6xb2t 11 месяцев назад
source code please ❤❤❤
@ekchills6948
@ekchills6948 Год назад
The timing is just too perfect.
@brettwestwooddeveloper
@brettwestwooddeveloper Год назад
I am glad I came in clutch
@mds_8888
@mds_8888 11 месяцев назад
i want to do this ( form with just phone number for login i send req to my api and api res a token and store it in session
Далее
Next-Auth on App Router - Solid Auth, Super Fast
17:20
Просмотров 106 тыс.
شربت كل الماء؟ 🤣
00:31
Просмотров 16 млн
Next Auth Credentials Provider - Ultimate Guide
50:01
10 common mistakes with the Next.js App Router
20:37
Просмотров 194 тыс.
Fetching Data Doesn't Get Better Than This
6:58
Просмотров 97 тыс.
The Ultimate Guide to Next Auth - Everything You Need
1:36:26
شربت كل الماء؟ 🤣
00:31
Просмотров 16 млн