Auth0 Home Blog Docs

How to get and use the ID Token / Access Token in a Shiny Server + auth0 setting?

r-shiny
shiny
#1

Hello,
I am developing a Shiny Server app with auth0, but am confused about how to find out who my logged user is.
My first goal is to get the users ID or shomething, I figure later on with the Management API I can obtain more information about the user.

I understand in theory that:

The ID Token and/or Access Token is passed through the Rules pipeline, then sent to the app.
https://auth0.com/docs/rules#what-can-i-use-rules-for-

Could somebody explain how this exactly works with a Shiny server and how can I access it in my server functions?
Is this information stored in some object I can directly access from the server side, like the session object maybe?

Thanks for the help!

#2

Hi! I am also following the same question. I wish to create app but I am stuck at getting the access token for the ID.

1 Like
#3

Update: I found a solution one can just re-use, from Curso-R,
here: https://github.com/curso-r/auth0

See the related part:

When you are connected, it is possible to access user information inside the session$userData$login_info object. This object must be acessed in a reactive environment.

#4

Thanks a lot for sharing it with the rest of community!

closed #5

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.