-
-
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
approval_prompt: 'auto' is not valid #177
Comments
This is affecting Vimeo and also one of our sites (we use https://github.com/thephpleague/oauth2-client/). Looks like a Google change and a fix is replacing https://developers.google.com/identity/protocols/oauth2/openid-connect#authenticationuriparameters |
Interesting, thanks. Wasn’t sure Shiny could work on Cloud Run so good to know, would be interested in your setup.
To confirm Hugo’s diagnosis try changing the URL parameters that you have at the Google OAuth2 login screen to exclude approval_prompt parameter. If so, then I can roll out a fix. It’s already possible if using the JavaScript client based authentication Shiny module, gar_Authjs
…________________________________
From: Hugo van Kemenade <[email protected]>
Sent: Tuesday, April 21, 2020 9:37:21 AM
To: MarkEdmondson1234/googleAuthR <[email protected]>
Cc: Subscribed <[email protected]>
Subject: Re: [MarkEdmondson1234/googleAuthR] approval_prompt: 'auto' is not valid (#177)
This is affecting Vimeo and also one of our sites (we use https://github.com/thephpleague/oauth2-client/).
Looks like a Google change and a fix is replacing approval_prompt=auto with prompt=, or leaving out both approval_prompt and prompt, or ``approval_prompt=force`.
https://developers.google.com/identity/protocols/oauth2/openid-connect#authenticationuriparameters
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#177 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAYCPLGYMSTO4UOJD2FZ3JTRNVELDANCNFSM4MNB3A7A>.
|
Update: it seems to be working as usual again today. Some temporary change or something on Google's end? |
Regarding Cloud Run setup. The main issue for me in setting it up (besides authentication :D) was that WebSockets are not supported. But disabling it in the protocols in Shiny server config, like instructed here works well in general, at least for "simpler" dashboards: rstudio/shiny#2455. The exception is that certain features and functions in Shiny seem to only work with WebSockets, like some parts of Dynamic UI I can't get to work properly on Cloud Run. |
Yes, looks like Google have sorted it. We've kept the fix in our library, because there's no mention of |
It is possible with current code to alter the approval_prompt, which is derived from googleAuthR/R/shiny-modifyurl.R Lines 18 to 38 in 11271d4
The default is googleAuthR/R/shiny-modifyurl.R Lines 124 to 153 in 11271d4
So it would look like: my_silent_auth <- function(req){
shiny::tags$script(shiny::HTML(
sprintf("location.replace(\"%s\");", gar_shiny_auth_url(req, approval_prompt = "force")
)))
}
ui <- fluidPage(...)
server <- function(input, output, session){
gar_shiny_auth(session)
...
}
shinyApp(gar_shiny_ui(ui, login_ui = my_silent_auth), server) The idea is you can alter the login page or behaviour as its a function that generated the login screen/URL. Will keep this issue open to see if the default needs to change if it happens again, otherwise I should document the above a little better. |
Okay, thank you very much! |
Hi, The correct parameter is "prompt" I use googleAuth-jsUI in my project. I needed to change to be able to unforce show consent page:
Now I can select "select_account" prompt:
Regards, |
Thanks very much @OuNao - I've updated the function on github (version 1.2.0) - can anyone test it to see if it works ok? A CRAN release is pending soon so this can be updated quickly. |
What goes wrong
I am using googleAuthR to access my Shiny dashboards hosted on Google Cloud Run. It has been working well, but today I got a new error I have not seen before, and I suspect the error is not in my setup.
Steps to reproduce the problem
Could it be that some changes to Google's API causes this?
The text was updated successfully, but these errors were encountered: