diff --git a/DESCRIPTION b/DESCRIPTION index ec8de38..99f17f2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: gmailr Title: Access the 'Gmail' 'RESTful' API -Version: 1.0.0.9000 +Version: 1.0.0.9001 Author: Jim Hester Maintainer: Jim Hester Description: An interface to the 'Gmail' 'RESTful' API. Allows diff --git a/R/aaa.R b/R/aaa.R index 639ae6c..5f8bd54 100644 --- a/R/aaa.R +++ b/R/aaa.R @@ -1 +1,9 @@ the <- new.env(parent = emptyenv()) + +.onLoad <- function(libname, pkgname) { + + .auth <<- gargle::init_AuthState( + package = "gmailr", + auth_active = TRUE + ) +} diff --git a/R/gm-auth.R b/R/gm-auth.R index 77ad197..97566e1 100644 --- a/R/gm-auth.R +++ b/R/gm-auth.R @@ -1,9 +1,8 @@ # This file is the interface between gmailr and the # auth functionality in gargle. -.auth <- gargle::init_AuthState( - package = "gmailr", - auth_active = TRUE -) + +# Initialization happens in .onLoad +.auth <- NULL # The roxygen comments for these functions are mostly generated from data # in this list and template text maintained in gargle.