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
So far enjoying stytch so thank you for the hard work.
A few things I have noticed. The shape of the decoded JWT is not typed, cannot seem to find in the B2B lib. I decided to make my own, but running into some interface mismatches with what I would expect.
session_custom claims are not appearing as expected. The MemberSession suggests custom claims lives on a custom_claims field on the session object, whereas in the actual decoded JWT, the custom claims are flattened onto the decoded JWT object. No preference on where they live, but given that the jwt actually encodes the member session my expectation given the MemberSession type would be that they would live on the session object.
The text was updated successfully, but these errors were encountered:
We provide a utility method - stytch.session.authenticateJwtLocal() - which handles validation and decoding of the JWT. The response of this method is typed. This method handles munging of the JWT data format back into the MemberSession data format - as they aren’t exactly 1-1.
Do you need anything in the underlying JWT that you are unable to get from the authenticateJwtLocal response?
So far enjoying stytch so thank you for the hard work.
A few things I have noticed. The shape of the decoded JWT is not typed, cannot seem to find in the B2B lib. I decided to make my own, but running into some interface mismatches with what I would expect.
Here is an example decoded JWT that I received from a B2B auth.
Two issues:
custom_claims
field on the session object, whereas in the actual decoded JWT, the custom claims are flattened onto the decoded JWT object. No preference on where they live, but given that the jwt actually encodes the member session my expectation given the MemberSession type would be that they would live on the session object.The text was updated successfully, but these errors were encountered: