These docs are for AuthRocket 1. Looking for AuthRocket 2 docs?

Returning a JWT with Updated User and Org Data

Q: In my app, when a user creates a new Org, they are set as the owner of that Org. I then need the user’s client to refresh its JWT token to show the changes.

How do I do this without forcing the user to manually re-login?


A: There’s an optional parameter to Get a Session that will do what you need. When validating a session, it will return the JWT with updated user/org/membership data:

GET /v1/sessions/:id?expand=token

This assumes that you already have Extended JWT token data enabled under: Settings -> Sessions & JWT.

Tagged with: sessions updated user data

Questions? Find a Typo? Get in touch.