Cannot access new users from Google Sheets using shinymanager, in

We have an application using secure_server from shinymanager that reads the names and passwords of users from Google Sheets. Everything works well in the desktop: if we add a new user in Google Sheets (using a browser), the user is immediately recognized in the application and the user can do a successful login.

However, if we first upload the application to and later add a new user in Google Sheets (using a browser), the app doesn't recognize the new user (it comes with the dreaded 'Username or password are incorrect'), and we have to reload the program from for the user to be accepted by the application.

Why can that be happening and how to solve it so that we don't have to refresh from every time a user is added? I also noticed that shiny.reglog, one authentication package for R, specifically mentions using DBI and Google Sheets, but there is no specific mention of Google Sheets in the documentation that I consulted for shinymanager. Does shinymanager work with Google Sheets or I'm doing something wrong?

  • I don't think it has to do with the 'Package Cache' option in Advanced Settings in because that refers to the packages, not to the data.
  • Also, I don't think it may happen with an internal data caching at the server level in because [as I understand it], every time the application is called runs from a different server (I guess).
  • secure_server is the only function we're using from shinymanager at this stage. The addition and deletion of users from Google Sheets we do it directly, accessing Google Sheets with a browser.

Sometimes [don't quote me on this], the app recognizes the new user after a few hours without reloading the app, but I could not find a definite time after which it works, so I'm wondering if there is a method that works all the time and recognizes the user as soon as it is created in Google Sheets. The new user would like to login immediately after the name is added in Google Sheets.

Thanks a lot