Merged in feature/streamlit_ui0_test (pull request #118)
Pratham URL Masking for security.py Approved-by: Priya Iragavarapu
This commit is contained in:
+14
-1
@@ -18,6 +18,13 @@ REDIRECT_URI = 'https://172.29.20.102:8501'
|
||||
|
||||
|
||||
|
||||
#URL Masking
|
||||
def clear_url():
|
||||
js_code = """
|
||||
window.history.replaceState({}, document.title, window.location.pathname);
|
||||
"""
|
||||
st.components.v1.html(f"<script>{js_code}</script>", height=0, width=0)
|
||||
|
||||
|
||||
def get_secret():
|
||||
|
||||
@@ -73,5 +80,11 @@ def handle_redirect(REDIRECT_URI):
|
||||
access_token = get_token_from_code(code, REDIRECT_URI)
|
||||
st.session_state['access_token'] = access_token
|
||||
st.session_state
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#URL Masking Pt.2
|
||||
if 'access_token' in st.session_state:
|
||||
clear_url()
|
||||
|
||||
Reference in New Issue
Block a user