Skip to content

No interactive prompting when running token_fetch() #278

Open
@nick-youngblut

Description

@nick-youngblut

The README states:

library(gargle)

token <- token_fetch()
#> The gargle package is requesting access to your Google account.
#> Enter '1' to start a new auth process or select a pre-authorized account.
#> 1: Send me to the browser for a new auth process.
#> 2: [email protected]
#> 3: [email protected]
#> Selection: 2

However, when I run gargle v1.5.2 in a new R session, I do not get such an interactive prompt when running token_fetch(). This results in Forbidden (HTTP 403) errors in downstream steps.

The output that I get:

> gargle::token_fetch()
<Token>
<oauth_endpoint>
 authorize: https://accounts.google.com/o/oauth2/v2/auth
 access:    https://oauth2.googleapis.com/token
 validate:  https://oauth2.googleapis.com/tokeninfo
 revoke:    https://oauth2.googleapis.com/revoke
NULL
<credentials> access_token, expires_in, token_type
---

sessionInfo()

R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.3

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Los_Angeles
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

loaded via a namespace (and not attached):
 [1] httr_1.4.7      compiler_4.3.1  R6_2.5.1        cli_3.6.1       gargle_1.5.2   
 [6] tools_4.3.1     fs_1.6.3        glue_1.6.2      curl_5.1.0      jsonlite_1.8.7 
[11] lifecycle_1.0.4 openssl_2.1.1   rlang_1.1.2     renv_1.0.2      askpass_1.2.0  

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions