datastorm-open / shinymanager

Simple and secure authentification mechanism for single shiny applications.
https://datastorm-open.github.io/shinymanager/
386 stars 79 forks source link

Failed to Update User error in dockerized Shiny app #175

Closed gudarzgiv closed 11 months ago

gudarzgiv commented 1 year ago

This is a great package, thank you! I am having trouble using it for a dockerized shiny app though. If I generate the credentials SQLite database during the docker build, it works perfectly. I simply use the create_db function, providing a plain text passphrase and the credentials file lives in the docker. However, I'd like to keep the db on persistent storage and be able to use the same credentials when I re-launch the docker or with another version of the app. That way I do not have to set up new accounts and passwords. When I do so, i.e. provide the previously set up credentials SQLite database file in a bind mount on the host, I can successfully login with any existing account, but can no longer add or modify accounts; shiny manager keeps throwing "Failed to update user" error when I try. I do not understand this behaviour, because it still reads the credentials file, it simply cannot make any changes.

pvictor commented 1 year ago

Hello,

Maybe check file permissions on the sqlite file to be sure that it's writeable.