You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to add tenant information, which is expressed via the hostname, to the session. Since this is not critical information but used across multiple components (server and client) throughout the app, this would come in super handy.
Note: I need this for both, authenticated and unauthenticated user sessions.
So far, I have a client component which is wrapped by the SessionProvider. Inside this component I have the following
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
I am trying to add tenant information, which is expressed via the
hostname
, to the session. Since this is not critical information but used across multiple components (server and client) throughout the app, this would come in super handy.Note: I need this for both, authenticated and unauthenticated user sessions.
So far, I have a client component which is wrapped by the
SessionProvider
. Inside this component I have the followingIn the
jwt
callback, I would then fetch some tenant specific data from the database, e.g. via PrismaI get the state variable
test
updated but unfortunately thejwt
callback in myauth.ts
never gets invoked. although the comment states:So if I'm not wrong I should be able to update the session regardless of an existing user session and/or token, right?
What am I doing wrong here?
Thanks! Any help appreciated! 🙌
Beta Was this translation helpful? Give feedback.
All reactions