-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
gar_set_client without using json file #216
Comments
Ok makes sense. It was possible to do this before but was removed in favor of the client file but I found a situation myself recently where that wasn't convenient, so will look at being able to supply them directly again too, as it used to do. |
We saw your solution for replacing the file paths with environment variables as its greatly increases security. We now also tried to replace the "googleAuthR::gar_auth_service()" function due the same problematic but we cannot get it working.
With this function we also receive an error when trying to access Google Cloud content: Do you have a solution for this step as well? As it would make the whole authentification process complete. |
Currently, if i need to use
gar_set_client()
, I have to provide a json file. However, storing the json file in a machine may increase the probability of leaking the sensitive information in the json file. I think providing the contents of the json file as an argument togar_set_client
is better since i can use environment variables.When i read the documentation of the
gar_set_client
, it saysHowever when i look at the source code, i've realized that it actually does more than that. Apart from setting environment variables and options, it invokes
oauth_app()
andgar_auth_configure()
. So setting the options mentioned in the documentation is not the same thing as callinggar_set_client
with a json file.To overcome this issue in my own use case (web client used in shiny application built with docker) I have created this very ugly looking function.
With this function i am able to achieve same functionality as
gar_set_client
without using json file. Instead, I useGGL_WEB_CLIENT_ID
,GGL_WEB_CLIENT_SECRET
,GGL_WEB_PROJECT_ID
environment variables.I think adding another function that enables user to pass the contents of the json file instead of the path of the json file could be good improvement.
The text was updated successfully, but these errors were encountered: