Skip to content

Commit

Permalink
update docs and demos for #177
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEdmondson1234 committed Apr 24, 2020
1 parent c5fbad6 commit 43a3590
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion R/gadget.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ gar_gadget <- function(){
token <- shiny::callModule(googleAuth,
"gadget",
login_text = "Login",
approval_prompt="force")
prompt="consent")

token <- token()

Expand Down
2 changes: 1 addition & 1 deletion R/shiny-auth.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ googleAuthUI <- function(id){
#' @param login_class The CSS class for the login link
#' @param logout_class The CSS class for the logout link
#' @param access_type Online or offline access for the authentication URL
#' @param approval_prompt Whether to show the consent screen on authentication
#' @param prompt What type of consent screen on authentication
#' @param revoke If TRUE a user on logout will need to re-authenticate
#'
#' @return A reactive authentication token
Expand Down
8 changes: 4 additions & 4 deletions R/shiny-modifyurl.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @param client.secret client.secret
#' @param scope API scopes
#' @param access_type whether to keep the token
#' @param approval_prompt Auto-login if user is recognised or always force signin
#' @param prompt Auto-login if user is recognised or always force signin
#'
#' @export
#' @family pre-load shiny authentication
Expand All @@ -21,9 +21,9 @@ gar_shiny_auth_url <- function(req,
client.secret = getOption("googleAuthR.webapp.client_secret"),
scope = getOption("googleAuthR.scopes.selected"),
access_type = c("online","offline"),
approval_prompt = c("auto","force")) {
prompt = c("consent", "select_account", "both", "none")) {
access_type <- match.arg(access_type)
approval_prompt <- match.arg(approval_prompt)
prompt <- match.arg(prompt)

url_redirect <- workout_redirect(req)

Expand All @@ -33,7 +33,7 @@ gar_shiny_auth_url <- function(req,
client.secret = client.secret,
scope = scope,
access_type = access_type,
approval_prompt = approval_prompt)
prompt = prompt)

}

Expand Down
2 changes: 1 addition & 1 deletion inst/server_side_auth_demo/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ shorten_url <- function(url){
server <- function(input, output, session){

## Create access token and render login button
access_token <- callModule(googleAuth, "loginButton", approval_prompt = "force")
access_token <- callModule(googleAuth, "loginButton", prompt = "consent")

short_url_output <- eventReactive(input$submit, {
## wrap existing function with_shiny
Expand Down

0 comments on commit 43a3590

Please sign in to comment.