add admin page to manage private data
This commit is contained in:
18
webpages/buffteks_authenticator.py
Normal file
18
webpages/buffteks_authenticator.py
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
# for authentication
|
||||
import yaml
|
||||
from yaml.loader import SafeLoader
|
||||
import streamlit_authenticator as stauth
|
||||
|
||||
|
||||
def load_authenticator():
|
||||
with open('webpages/users.yaml') as f:
|
||||
users = yaml.load(f, Loader=SafeLoader)
|
||||
|
||||
authenticator = stauth.Authenticate(
|
||||
users['credentials'],
|
||||
users['cookie']['name'],
|
||||
users['cookie']['key'],
|
||||
users['cookie']['expiry_days']
|
||||
)
|
||||
return authenticator
|
||||
Reference in New Issue
Block a user