Files
shiny_form/helpers/init_login_db.r
2025-03-02 22:37:56 +03:00

20 lines
546 B
R

# script to setup authentification database (using shinymanager)
# SETUP AUTH =============================
# Init DB using credentials data
credentials <- data.frame(
user = c("admin", "user"),
password = c("admin", "user"),
# password will automatically be hashed
admin = c(TRUE, FALSE),
stringsAsFactors = FALSE
)
# Init the database
shinymanager::create_db(
credentials_data = credentials,
sqlite_path = "auth.sqlite", # will be created
passphrase = Sys.getenv("AUTH_DB_KEY")
# passphrase = "passphrase_wihtout_keyring"
)