使用 gspread 包授权登录 shiny io

authorizing login in shiny io using gspread package

嗨,我是 gspread 的新手,我想把我的项目放在 shiny io 中。但是,当我这样做时,使用

从连接读取时出现错误
pwd <- getwd()
HTTR_OAUTH <- c(pwd) %>% file.path(".httr-oauth")
HTTR_OAUTH <- HTTR_OAUTH[HTTR_OAUTH %>% file.exists()]

if(length(HTTR_OAUTH) > 0) {
  HTTR_OAUTH <- HTTR_OAUTH[1]
  file.copy(from = HTTR_OAUTH, to = ".httr-oauth", overwrite = TRUE)  
 }

我想知道是否有办法让它在闪亮的 io 中要求您 google 登录,或者您是否可以提供用户名和密码以在 R 脚本中进行 gspread。

请注意包已重命名:

https://github.com/jennybc/googlesheets

关于与 Shiny 的集成,请参阅 shinyga 包,该包最近包含对 googlesheets 的支持及其身份验证方法:

https://github.com/MarkEdmondson1234/shinyga