useSession has an empty user object {}
When using the useSession hook, session.data contains
{ user: {}, expires: '2023-06-30T20:30:42.181Z' }
this is my auth options:
1 Reply
To be honest i forgot how you exactly add data to the session, but you can check these auth options:
https://github.com/AlandSleman/t3-twitter-clone/blob/main/src/pages/api/auth/%5B...nextauth%5D.ts
I think if you declare the module you'll get typesafety just like line 29