Create a YAML configuration file to manage user credentials and cookie settings. The file should include cookie settings (expiry, key, name), credentials (usernames, emails, names, passwords, and optional roles), and optional sections for oauth2 (Google/Microsoft) and pre-authorized emails.
Note: Plain text passwords in this file will be hashed automatically by the library. You must update this file whenever its contents are modified by widgets (e.g., after registration or password resets).
cookie:
expiry_days: 30
key: # To be filled with any string
name: # To be filled with any string
credentials:
usernames:
jsmith:
email: jsmith@gmail.com
failed_login_attempts: 0
first_name: John
last_name: Smith
logged_in: False
password: abc
roles:
- admin
- editor
- viewer
rbriggs:
email: rbriggs@gmail.com
failed_login_attempts: 0
first_name: Rebecca
last_name: Briggs
logged_in: False
password: def
roles:
- viewer
oauth2: # Optional
google:
client_id: # To be filled
client_secret: # To be filled
redirect_uri: # URL to redirect to after OAuth2 authentication
microsoft:
client_id: # To be filled
client_secret: # To be filled
redirect_uri: # URL to redirect to after OAuth2 authentication
tenant_id: # To be filled
pre-authorized: # Optional
emails:
- melsby@gmail.com