Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -304,6 +304,11 @@ def get_user_info(access_token):
|
|
304 |
else:
|
305 |
raise Exception(f"Failed to fetch user info: {response.status_code} - {response.text}")
|
306 |
|
|
|
|
|
|
|
|
|
|
|
307 |
def initiate_auth_flow():
|
308 |
client_instance = get_msal_app()
|
309 |
auth_url = client_instance.get_authorization_request_url(
|
@@ -313,11 +318,6 @@ def initiate_auth_flow():
|
|
313 |
)
|
314 |
st.write('๐ Please [click here]({}) to log in and authorize the app.'.format(auth_url))
|
315 |
|
316 |
-
def generate_state():
|
317 |
-
state = secrets.token_urlsafe(32)
|
318 |
-
st.session_state['auth_state'] = state
|
319 |
-
return state
|
320 |
-
|
321 |
def is_token_valid(token):
|
322 |
if not token:
|
323 |
return False
|
|
|
304 |
else:
|
305 |
raise Exception(f"Failed to fetch user info: {response.status_code} - {response.text}")
|
306 |
|
307 |
+
def generate_state():
|
308 |
+
state = secrets.token_urlsafe(32)
|
309 |
+
st.session_state['auth_state'] = state
|
310 |
+
return state
|
311 |
+
|
312 |
def initiate_auth_flow():
|
313 |
client_instance = get_msal_app()
|
314 |
auth_url = client_instance.get_authorization_request_url(
|
|
|
318 |
)
|
319 |
st.write('๐ Please [click here]({}) to log in and authorize the app.'.format(auth_url))
|
320 |
|
|
|
|
|
|
|
|
|
|
|
321 |
def is_token_valid(token):
|
322 |
if not token:
|
323 |
return False
|