Ability to save variables from custom auth login

I'd like the ability to save a variable from the custom auth login process that I can reference elsewhere in apps.

For example my custom auth process returns a user_id that I'd like to display to the user in a app that uses this resource. Another use case is that one of my queries requires the user's user_id and I have no way to automatically get that from the custom login.

So the recap, I'd like there to be a way to create a variable from the custom auth process that can be referenced in apps that use that specific resource.