I am using the built-in AuthUserSession and saving data to session Company field:
I am using a Memory cache provider.
But the data doesn't stay in the session, when I call the service again on loading the session the Company is null again.
I need to use the session variable in my RegisterQueryFilter:
Have a look at the raw HTTP Headers through Fiddler or Web Inspector and confirm that they're sending the same
ss-pid Session Cookies.
I am using JWT, but it is not showing the cookies in the request:
I am calling session-to-token, if that helps?
If you're using JWT's, the BearerToken embedded in the JWT is what creates the UserSession, you can't save your own server UserSession which would be in conflict with the JWT's UserSession.
Checkout the JWT docs if you want to embed additional info in the JWT so it's also populated on the UserSession.
Thanks I am using headers instead now as it would be a value that change quite often and I wouldn't want to change my JWT Token every time.