-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathapp.py
62 lines (42 loc) · 1.3 KB
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import streamlit as st
st.set_page_config(page_title="Auth demo", page_icon=":material/person_add:")
st.title("Auth demo!")
left, middle1, middle2, right, logout_button_column = st.columns([1, 1, 1, 1.1, 1])
with left:
google_button = st.button("Google Login")
if google_button:
st.login(provider="google")
with middle1:
auth_zero_login = st.button("Auth0 Login")
if auth_zero_login:
st.login(provider="auth0")
with middle2:
okta_login = st.button("Okta Login")
if okta_login:
st.login(provider="okta")
with right:
microsoft_login = st.button("Microsoft Login")
if microsoft_login:
st.login(provider="microsoft")
st.write(":sparkles: :rainbow[User data]")
st.write(st.experimental_user)
with logout_button_column:
logout_button = st.button("Logout")
if logout_button:
st.logout()
st.header("Streamlit app code:")
st.code(
body="""
google_button = st.button("Google Login")
if google_button:
st.login(provider="google")
logout_button = st.button("Logout")
if logout_button:
st.logout()
st.write(st.experimental_user)
""",
language="python",
)
st.header("Secrets.toml file example:")
with open("./.streamlit/secrets.toml.example", "r") as f:
st.code(f.read(), language="toml")