interface 2 session expirty redirect
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import json
|
||||
|
||||
import security
|
||||
import boto3
|
||||
from langchain.prompts import PromptTemplate
|
||||
from langchain.embeddings.bedrock import BedrockEmbeddings
|
||||
@@ -65,6 +65,9 @@ try:
|
||||
user_mail = st.session_state.user_info['mail']
|
||||
except KeyError as e:
|
||||
st.write("Session Expired.")
|
||||
#st.write("Please sign-in to use this app.")
|
||||
auth_url = security.get_auth_url(REDIRECT_URI)
|
||||
st.markdown(f"<a href='{auth_url}' target='_self'>Sign In</a>", unsafe_allow_html=True)
|
||||
st.stop()
|
||||
|
||||
# remove below try except statement if comparison with actual vales is not required
|
||||
|
||||
Reference in New Issue
Block a user