-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multipage APP #13
Comments
Here is a sample scheme. Users can only log in/out from the main page. Store a login session state variable so that other pages has login info. They can use it to open its contents. Sample layout.
import streamlit as st
from streamlit_login_auth_ui.widgets import __login__
if 'login' not in st.session_state:
st.session_state.login = False
__login__obj = __login__(auth_token="courier_auth_token",
company_name="Shims",
width=200, height=250,
logout_button_name='Logout', hide_menu_bool=False,
hide_footer_bool=False,
lottie_url='https://assets2.lottiefiles.com/packages/lf20_jcikwtux.json')
st.session_state.login = __login__obj.build_login_ui()
if st.session_state.login:
st.markdown("Welcome to Main page!")
import streamlit as st
if 'login' not in st.session_state:
st.session_state.login = False
if st.session_state.login:
st.write('Welcome to ChatGPT')
else:
st.write('Please login in the main page to see its contents.') |
Thanks, it really helps a lot. |
I already have that feature on my branch. This is now offered as pull request. |
Hi, |
From the readme: auth_token : The unique authorization token received from - https://www.courier.com/email-api/ |
I am a bit know what it is. Only a few people hear about courier in some countries and no one use it. So it didn't work for us. |
Yes, we have never heard about courier before. I registered on https://www.courier.com/email-api/, now I often receive spam emails from courier. Could you tell us how to get authorization token from courier and how to use it ? |
Hi,
Streamlit now support multipage app (https://docs.streamlit.io/library/get-started/multipage-apps). Then how to use streamlit_login_auth_ui where there are many pages ?
The text was updated successfully, but these errors were encountered: