How to Attach More Data to Next-Auth Session Users 🔑

preview_player
Показать описание
How to add more data to the user object of Next-auth sessions, by overriding the session callback in the Next-auth route handler configuration. This avoids a second database call.

📣 Follow Coding in Flow on social media:
Рекомендации по теме
Комментарии
Автор

hey! i'm trying to add the user id to the session, i created the .d.ts file but my session still only have the default attributes. What is probably wrong? great video btw :)

pabloalvarez
Автор

Thanks man i was so struggling with that ... that's so frustrating to have to do all that to just add more information in session ...

DistorsionMentale
Автор

ma broo, how do i use the type in callback function. i already make the session type but, i still get typecsript error when i call in callbacks, thanks broo

rolandosuak
Автор

how do you update the session user tokensUsed?

ahmoin
Автор

This works for client side session. but not for server side session. how can i do it for server side session ?

arch_
Автор

Bro imma try this out i hope it would help me becuz I've been tryin to solve this problem for a long time and I did it once but not in other cases.

ravendelarama
Автор

Problem is this doesn’t work with the drizzle adapter

alvaroaquije
Автор

Why do you store sessions to the database?

nomxxn
Автор

it only updates client side session how to update server side session

krishkrish
Автор

Wait a min... This was my question just two hours ago but I was tired and had to put it to rest. Are you spying on me? 😀👀

bandekhoda
Автор

please remove 2x speed from your videos, people who don’t know English well don’t understand anything.

timur.shhhhh
Автор

ok, I get it, you‘re german and have a strong accente.

emmaanna
Автор

Tbh I don't like the fact that I need to change the type ... Eeeeh

xtz_