#from where does the data come from, that is inside the useSession hook?

4 messages · Page 1 of 1 (latest)

chilly vortex
#

I want to add data to the session that is returned from the useSession hook, i am returning an object with userid , name , email in the authorize function from the [..nextauth].js
But when i print the session data from the client side the object only contains name and email.

how can i add more data that i might need to use in the client side.

"next": "13.2.4",
"next-auth": "^4.20.1",

please help
i find the next-auth documentation hard to follow, please share any good tutorials on how to implement authentication using Credentials.

cunning elbow
#

also, if what you are facing is a limitation of next-auth you can add a second call once you are logged-in to ask for the information you want to the API

#

so:

  • login API call, all good then
  • make a second call once authenticated to grab the info you need