awacke1 commited on
Commit
ebab243
Β·
verified Β·
1 Parent(s): d301be5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -137,13 +137,13 @@ def main():
137
  # πŸ”‘ Authentication
138
  if 'access_token' not in st.session_state:
139
  # πŸ•΅οΈβ€β™‚οΈ Check for authorization code in query parameters
140
- query_params = st.experimental_get_query_params()
141
  if 'code' in query_params:
142
  code = query_params['code'][0]
143
  st.write('πŸ”‘ Acquiring access token...')
144
  access_token = get_access_token(code)
145
  st.session_state['access_token'] = access_token
146
- st.experimental_rerun() # Reload the app to clear the code from URL
147
  else:
148
  # πŸ“’ Prompt user to log in
149
  client_instance = get_msal_app()
 
137
  # πŸ”‘ Authentication
138
  if 'access_token' not in st.session_state:
139
  # πŸ•΅οΈβ€β™‚οΈ Check for authorization code in query parameters
140
+ query_params = st.get_query_params()
141
  if 'code' in query_params:
142
  code = query_params['code'][0]
143
  st.write('πŸ”‘ Acquiring access token...')
144
  access_token = get_access_token(code)
145
  st.session_state['access_token'] = access_token
146
+ st.rerun() # Reload the app to clear the code from URL
147
  else:
148
  # πŸ“’ Prompt user to log in
149
  client_instance = get_msal_app()