diff --git a/streamlit/security.py b/streamlit/security.py index b3bcee3..d759570 100644 --- a/streamlit/security.py +++ b/streamlit/security.py @@ -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"", 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() \ No newline at end of file