Add a method to reset the OAuth token.
Something like the following, but package-internal and tested to ensure
getReads\Variants()return the "you need to authenticate" error until authentication is performed- the oauth flow is triggered by the next call to
authenticate()
resetOAuth <- function() {
if (FALSE != getOption("google_auth_cache_httr")) {
message(paste("Removing cached OAuth token from", getOption("google_auth_cache_httr")))
file.remove(getOption("google_auth_cache_httr"))
}
message("Removing cached OAuth token from memory.")
rm("google_token", envir=GoogleGenomics:::.authStore)
}
Any thought you want to simply rely on https://github.com/MarkEdmondson1234/googleAuthR for auth stuff?
FWIW, we've been trying to grow some common/shared support code for "making Google APIs in R easier" over at https://github.com/r-lib/gargle. In particular, we've got a fairly functional set of auth code over there, and have plans for more.
It will be nice to simply depend on some other well-maintained package for auth and even API. I was not aware of these packages, mostly because I have been dormant in this space. Thank you for pointing me in this direction.
I will look into porting this package's auth mechanism to depend on googleAuthR, or possibly gargle if it is submitted to CRAN. The discovery mechanism in googleAuthR is what I wanted a long time ago but never got around to it; good to see it is out there now.
For now, currently active #56 will make all auth options available.
Sid, would you be interested in getting a few of us together to discuss on a call? Jenny Bryant, Hadley, Craig, some folks from the Institute for Systems Biology, and a few others might be interested. I'd love to see an enterprise solution that we could all rely on.
Sean
On Tue, Jul 25, 2017 at 6:39 PM, Siddhartha Bagaria < [email protected]> wrote:
It will be nice to simply depend on some other well-maintained package for auth and even API. I was not aware of these packages, mostly because I have been dormant in this space. Thank you for pointing me in this direction.
I will look into porting this package's auth mechanism to depend on googleAuthR, or possibly gargle if it is submitted to CRAN. The discovery mechanism in googleAuthR is what I wanted a long time ago but never got around to it; good to see it is out there now.
For now, currently active #56 https://github.com/Bioconductor/GoogleGenomics/pull/56 will make all auth options available.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Bioconductor/GoogleGenomics/issues/49#issuecomment-317893747, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFpE4C8KaoLKHSq8CfYAcy4f5yqyZc1ks5sRm67gaJpZM4G2Cfz .
-- Sean Davis, MD, PhD Center for Cancer Research National Cancer Institute National Institutes of Health Bethesda, MD 20892 https://seandavi.github.io/ https://twitter.com/seandavis12
Sean, thank you for the offer. Unfortunately I won't be able to find time to coordinate such an effort. Maybe @craigcitro or @deflaux are better placed to help with this?
Hi all! gargle is under active development and should provide a one-stop shop for Google auth. @craigcitro has done all the initial development and I am taking it further as we prepare it for CRAN. it is in the critical path for putting googledrive on CRAN and for updating googlesheets, so it will definitely happen. And sooner rather than later.
My advice would be for someone who cares about outsourcing the Google auth for this package to keep an eye out (or watch more formally) as gargle/googledrive mature in the next couple months.
Sounds great @jennybc ! Watching that repo now.