GoogleGenomics icon indicating copy to clipboard operation
GoogleGenomics copied to clipboard

Add a method to reset the OAuth token.

Open deflaux opened this issue 10 years ago • 7 comments

Something like the following, but package-internal and tested to ensure

  1. getReads\Variants() return the "you need to authenticate" error until authentication is performed
  2. 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)
}

deflaux avatar Dec 15 '15 21:12 deflaux

Any thought you want to simply rely on https://github.com/MarkEdmondson1234/googleAuthR for auth stuff?

seandavi avatar Jul 25 '17 18:07 seandavi

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.

craigcitro avatar Jul 25 '17 19:07 craigcitro

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.

siddharthab avatar Jul 25 '17 22:07 siddharthab

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

seandavi avatar Jul 25 '17 23:07 seandavi

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?

siddharthab avatar Jul 26 '17 20:07 siddharthab

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.

jennybc avatar Aug 01 '17 23:08 jennybc

Sounds great @jennybc ! Watching that repo now.

deflaux avatar Aug 02 '17 16:08 deflaux