Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: googleAuthR
Type: Package
Version: 1.3.0.9000
Version: 1.3.0.9001
Title: Authenticate and Create Google APIs
Description: Create R functions that interact with OAuth2 Google APIs
<https://developers.google.com/apis-explorer/> easily,
Expand Down
10 changes: 2 additions & 8 deletions R/auth_gargle.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@

#' Environment to store authentication credentials
#'
#' Used to keep persistent state.
#' Used to keep persistent state. Initialized in .onLoad.
#' @noRd
.auth <- gargle::init_AuthState(
package = "googleAuthR",
auth_active = TRUE
#app = NULL,
#api_key = NULL,
#cred = NULL
)
.auth <- NULL


## The roxygen comments for these functions are mostly generated from data
Expand Down
8 changes: 8 additions & 0 deletions R/options.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
.onLoad <- function(libname, pkgname) {

.auth <<- gargle::init_AuthState(
package = "googleAuthR",
auth_active = TRUE
#app = NULL,
#api_key = NULL,
#cred = NULL
)

sys_or_null <- function(x){
sys <- Sys.getenv(x)
if (sys == "") return(NULL)
Expand Down