in order to be able to persistently store data created on Shinyapps.io, I have decided to use Dropbox via rdrop2. However, I have a problem: rdrop2 wants a manual authentication from Dropbox via the browser every time.
My plan was to intercept this via a dropkey.rds.
So I completed the authentication via the browser locally on my PC, saved the dropkey.rds and, to be on the safe side, put it in my www folder and in the directory where the corresponding script is located AND in the "project top folder". Simply so that the function can find the dropkey.rds for sure.
Unfortunately, it does not work. Even locally, the script asks me for authentication (at least the first time I run it). In Shinyapps, the programme simply crashes because no browser can open here.
How can I get around the authentication in Shinyapps.io?
You can find some code excerpts at the end of the post. Thank you!!!
Best regards
Code extract:
token <- readRDS("droptoken.rds")
drop_acc(dtoken = token)
drop_upload(Pn, path = "test")
(Pn is just a Path to a png thatt should be uploaded)
Log Shinyapps.io
Waiting for authentication in browser... 2021-10-15T10:21:44.490437+00:00 shinyapps[48xxxxx]: Press Esc/Ctrl + C to abort 2021-10-15T10:21:44.491678+00:00 shinyapps[48xxxxx]: https://www.dropbox.com/oauth2/authorize?client_id=mxxxxxx2w&redirect_uri=xxxx 2021-10-15T10:21:44.491610+00:00 shinyapps[48xxxxxx]: Please point your browser to the following url: