Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

Authentication error #118

Closed
okassi opened this issue Jun 4, 2021 · 7 comments
Closed

Authentication error #118

okassi opened this issue Jun 4, 2021 · 7 comments

Comments

@okassi
Copy link

okassi commented Jun 4, 2021

According to the readme:,

The first time you use an rfigshare function, it will ask you to authenticate online. Just log in and click okay to authenticate rfigshare. R will allow you to cache your login credentials so that you won't be asked to authenticate again (even between R sessions), as long as you are using the same working directory in future.

After installing rfigshare on a fresh machine (without an existing .httr-oauth)

library(devtools) 
install_github('ropensci/rfigshare')
library(rfigshare)

id = 3761562
fs_browse(id)

Error in value[[3L]](cond) : Requires authentication.
       Are your credentials stored in options?
       See fs_auth function for details.

Thus, I am not asked to authenticate.

My sessionInfo is as follows:

sessionInfo()

R version 4.0.5 (2021-03-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

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

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

other attached packages:
[1] rfigshare_0.3.7.100

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.6       magrittr_2.0.1   tidyselect_1.1.0 munsell_0.5.0
 [5] colorspace_2.0-1 R6_2.5.0         rlang_0.4.11     fansi_0.5.0
 [9] httr_1.4.2       dplyr_1.0.5      grid_4.0.5       gtable_0.3.0
[13] utf8_1.2.1       DBI_1.1.1        ellipsis_0.3.2   assertthat_0.2.1
[17] yaml_2.2.1       tibble_3.1.2     lifecycle_1.0.0  crayon_1.4.1
[21] RJSONIO_1.3-1.4  purrr_0.3.4      ggplot2_3.3.3    later_1.2.0
[25] vctrs_0.3.8      promises_1.2.0.1 glue_1.4.2       compiler_4.0.5
[29] pillar_1.6.1     generics_0.1.0   scales_1.1.1     XML_3.99-0.6
[33] httpuv_1.6.1     pkgconfig_2.0.3
@jcolomb
Copy link

jcolomb commented Jun 4, 2021

try to authenticate first with fs_auth () and try again.
it might be that browsing was not needing authentification is a former version of the API and now does (??).

@okassi
Copy link
Author

okassi commented Jun 4, 2021

Unfortunately that does not work either.

> fs_auth()
Error in init_oauth1.0(self$endpoint, self$app, permission = self$params$permission,  :
  Bad Request (HTTP 400).

Could this be a Figshare API issue?

@muschellij2
Copy link

You can run this if you don't want to auth and the article is public (cross post from SO: https://stackoverflow.com/a/67926877/2549133):

fs_details(article_id = 3761562, mine = FALSE, session = NULL)

@okassi
Copy link
Author

okassi commented Jun 11, 2021

@muschellij2 -- thanks! Indeed, things that do not require authentication work fine. Alas, the authentication issue remains.

@okassi
Copy link
Author

okassi commented Jun 29, 2021

Seems that Figshare has blocked all requests that use http://. Moving to https:// seems to resolve quite a few issues.

@rgaiacs
Copy link

rgaiacs commented Mar 17, 2022

Any update on this?

@cboettig
Copy link
Collaborator

This package has been deprecated in favor of https://github.com/ropenscilabs/deposits, which should do what you need!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants