Skip to content

Commit

Permalink
add api url as default
Browse files Browse the repository at this point in the history
  • Loading branch information
jtrecenti committed Feb 13, 2019
1 parent 79900f2 commit 0355c7d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/auth0.R
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,14 @@ use_auth0 <- function(path = ".", file = "_auth0.yml", overwrite = FALSE) {
if (file.exists(f) && !overwrite) {
stop("File exists and overwrite is FALSE.")
}
ks <- list(key = 'Sys.getenv("AUTH0_KEY")',
secret = 'Sys.getenv("AUTH0_SECRET")')
ks <- list(key = 'Sys.getenv("AUTH0_KEY")', secret = 'Sys.getenv("AUTH0_SECRET")')
api_url <- "paste0('https://', Sys.getenv('AUTH0_USER'), '.auth0.com')"
attr(ks[[1]], "tag") <- "!expr"
attr(ks[[2]], "tag") <- "!expr"
attr(api_url, "tag") <- "!expr"
yaml_list <- list(
name = "myApp",
shiny_config = "http://localhost:8100",
auth0_config = list(api_url = "", credentials = ks))
auth0_config = list(api_url = api_url, credentials = ks))
yaml::write_yaml(yaml_list, f)
}

0 comments on commit 0355c7d

Please sign in to comment.