Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -43,8 +43,7 @@ else:
|
|
43 |
# Create the MSAL instance for acquiring tokens
|
44 |
client_instance = get_msal_app()
|
45 |
|
46 |
-
|
47 |
-
def get_access_token(code, code_verifier):
|
48 |
client_instance = get_msal_app()
|
49 |
|
50 |
st.write("Debug: MSAL App Configuration:")
|
@@ -53,13 +52,11 @@ def get_access_token(code, code_verifier):
|
|
53 |
st.write(f"Redirect URI: {REDIRECT_URI}")
|
54 |
|
55 |
try:
|
56 |
-
#
|
57 |
result = client_instance.acquire_token_by_authorization_code(
|
58 |
code=code,
|
59 |
scopes=SCOPES,
|
60 |
-
redirect_uri=REDIRECT_URI
|
61 |
-
# If your MSAL library supports PKCE, this will work:
|
62 |
-
code_verifier=code_verifier
|
63 |
)
|
64 |
|
65 |
if 'access_token' in result:
|
|
|
43 |
# Create the MSAL instance for acquiring tokens
|
44 |
client_instance = get_msal_app()
|
45 |
|
46 |
+
def get_access_token(code):
|
|
|
47 |
client_instance = get_msal_app()
|
48 |
|
49 |
st.write("Debug: MSAL App Configuration:")
|
|
|
52 |
st.write(f"Redirect URI: {REDIRECT_URI}")
|
53 |
|
54 |
try:
|
55 |
+
# Remove the 'code_verifier' parameter for now
|
56 |
result = client_instance.acquire_token_by_authorization_code(
|
57 |
code=code,
|
58 |
scopes=SCOPES,
|
59 |
+
redirect_uri=REDIRECT_URI
|
|
|
|
|
60 |
)
|
61 |
|
62 |
if 'access_token' in result:
|