While it is possible to get user information from the session id. I would reccommend passing user_id instead and then using the User DbObject: https://docs.q2developer.com/api_references/q2_sdk/db/db_objects/user.html
We've have successfully stored the user_id in Q2 cache under a one time use token, set the token in the cookie and then looked up the user using the token when we get the response back from our Congito instance. Since this exchange of information is quick, unless the session expires within this very narrow window, this should work just fine for us. Thanks for the suggestion.
—