What's the best way to manually refresh the user's...
# support-questions-legacy
d
What's the best way to manually refresh the user's token after adding data to the session? I'm currently storing metadata in session state
Copy code
py
session_data = await auth_session.get_session_data_from_database()
session_data['organization_id'] = str(organization_id)
await auth_session.update_session_data_in_database(session_data)
and want this included in the JWT token, which I think I should do by overriding
create_new_session
(do I also need to override
refresh_session
?). Whenever the frontend calls the API to update the organization in session data, I want to make the frontend fetch a new JWT where that is reflected (for context I'm setting up Hasura using https://hasura.io/learn/graphql/hasura-authentication/integrations/supertokens/)
3 Views