Is it possible to obtain information about the user viewing the app from within the app? Preferably, I would like to pull their user ID so I can submit it as a function input.
It depends on where your app is running. If you're on Connect or Shinyapps.io and your app requires authentication the session$user
object should have the user's identity.
- Shiny - Creating user privileges on Posit Connect and Shiny Server Pro
- Shiny for R – Posit Connect Documentation Version 2025.05.0
- shinyapps.io Documentation - Authentication and User Management
Otherwise you'll need to roll your own auth.