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

Limit Shiny access to a list of users #175

Closed
rasnes opened this issue Feb 9, 2020 · 3 comments
Closed

Limit Shiny access to a list of users #175

rasnes opened this issue Feb 9, 2020 · 3 comments

Comments

@rasnes
Copy link

rasnes commented Feb 9, 2020

What goes wrong

I can't seem to find any way to restrict access to Shiny apps for just a limited subset of gmail users, which one could provide e.g. by list or character vector. Is this possible?

I am using gar_shiny_auth to require login to access to Shiny dashboards, which works great, but I would like be able to specify which users that should get access.

Thanks for making and maintaining this great package!

@MarkEdmondson1234
Copy link
Owner

MarkEdmondson1234 commented Feb 10, 2020 via email

@rasnes
Copy link
Author

rasnes commented Feb 10, 2020

Great! I think I already am requesting the email scope by specifying options(googleAuthR.scopes.selected = "email") before any gar_shiny_* functions are run.

Sorry, but I don't immediately see how to enable this. How can I make gar_shiny_auth check against emails in a provided whitelist? Or, are there any other function(s) in googleAuthR that I could use for this? Could you please point me in the right direction? Thanks!

@MarkEdmondson1234
Copy link
Owner

MarkEdmondson1234 commented Feb 11, 2020

There is nothing specific in googleAuthR (at the moment, maybe it can be added) - you could also try looking at gargle to see if its implemented there https://github.com/r-lib/gargle

It would involve making an API call (to what endpoint?) and parsing out the email from the response, then checking against a whitelist you have configured somewhere.

You would probably want to specify the "email" scope and also any API scopes you need e.g. c("email", "bigquery")

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

No branches or pull requests

2 participants