Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: add a SHINYPROXY_AUTH_STATUS environment variable #486

Open
WahiduzzamanKhan opened this issue Apr 18, 2024 · 3 comments
Open

Comments

@WahiduzzamanKhan
Copy link

Description:

ShinyProxy currently provides the SHINYPROXY_USERNAME environment variable within Shiny apps. However, this variable always contains a value, even when authentication is disabled. This makes it difficult for Shiny apps to programmatically determine the authentication status of the ShinyProxy instance.

Motivation:

There are scenarios where Shiny apps need to adapt their behavior based on whether authentication is enabled or not. For example, an app might:

  • Display different content or images depending on the logged-in user or anonymous users.
  • Restrict access to certain functionalities based on user roles.
  • Tailor the user interface based on authentication requirements.

Proposed Solution:

Introduce a new environment variable named SHINYPROXY_AUTH_STATUS. This variable would return a boolean value (TRUE or FALSE) indicating whether authentication is enabled for the ShinyProxy instance.

Benefits:

  • Improved flexibility for Shiny app developers to adapt their apps based on the authentication status.
  • Cleaner and more robust code for handling authentication-related logic within Shiny apps.
  • Enhanced consistency with other environment variables that provide information about the deployment environment.
@LEDfan
Copy link
Member

LEDfan commented May 7, 2024

Hi

Thank you for your detailed suggestion. I see the need for such an environment variable. I think it might be better to introduce an environment variable SHINYPROXY_AUTH_BACKEND indicating which authentication backend was used to authenticate the user. I think this would support more use-cases. So in your case this would be none. What do you think?

@WahiduzzamanKhan
Copy link
Author

Hi 👋

I think it is an excellent idea. It would cover a variety of use cases including mine.

@WahiduzzamanKhan
Copy link
Author

Hello @LEDfan

I was wondering if there is any timeline or estimated schedule for when this feature might be implemented? This feature is quite important for our use case, and any information on its potential release would be greatly appreciated.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants