diff --git a/streamlit/security.py b/streamlit/security.py index 7fc266c..0701852 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)