diff --git a/streamlit/security.py b/streamlit/security.py index 0701852..7fc266c 100644 --- a/streamlit/security.py +++ b/streamlit/security.py @@ -19,7 +19,7 @@ def get_auth_url(REDIRECT_URI): auth_url = app.get_authorization_request_url(SCOPE, redirect_uri=REDIRECT_URI) return auth_url -@st.cache_data + def get_token_from_code(auth_code, REDIRECT_URI): app = msal.ConfidentialClientApplication(CLIENT_ID, authority=AUTHORITY, client_credential=CLIENT_SECRET) result = app.acquire_token_by_authorization_code(auth_code, scopes=SCOPE, redirect_uri=REDIRECT_URI) diff --git a/streamlit/util.py b/streamlit/util.py index 7e4565a..9ae66f7 100644 --- a/streamlit/util.py +++ b/streamlit/util.py @@ -2,6 +2,7 @@ import streamlit as st import security +@st.cache_data def setup_page(REDIRECT_URI): # st.set_page_config( # page_title=page_title,