I'm uploading an app that has data that needs to be hidden. The app will be publicly available allowing users to make selections to view parts of the data in different ways. I set up google sheets and a google service account, as well as downloaded the json credential file for it to be used. The app works completely fine locally, but when I go to publish it will not allow the app to access the data.
drive_auth(path = ".secrets/client_secret.json") gs4_auth(path = ".secrets/client_secret.json")
These 2 lines of code refer to the json file, the file is there and again works great locally. I am also uploading the .secrets folder with the app. The app only calls the sheets once then stores them into a variable used by the app.
When I go to publish the app I get these errors in the shiny logs after uploading. gs4_deauth will show the data publicly, and I have been unable to use the article provided to solve the issue.
2024-01-25T02:25:42.215871+00:00 shinyapps[11014021]: Warning: Error in gs4_auth: Can't get Google credentials.
2024-01-25T02:25:42.221097+00:00 shinyapps[11014021]: ℹ Are you running googlesheets4 in a non-interactive session? Consider:
2024-01-25T02:25:42.226214+00:00 shinyapps[11014021]: • Call `gs4_deauth()` to prevent the attempt to get credentials.
2024-01-25T02:25:42.231187+00:00 shinyapps[11014021]: • Call `gs4_auth()` directly with all necessary specifics.
2024-01-25T02:25:42.235915+00:00 shinyapps[11014021]: ℹ See gargle's "Non-interactive auth" vignette for more details:
2024-01-25T02:25:42.240837+00:00 shinyapps[11014021]: ℹ <https://gargle.r-lib.org/articles/non-interactive-auth.html>