Skip to content

Commit 5555e9d

Browse files
committed
Return raw id token, also fix hanging issue
1 parent 389042f commit 5555e9d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

msal/broker.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def _convert_result(result, client_id, expected_token_type=None): # Mimic an on
9292
return_value = {k: v for k, v in {
9393
"access_token": result.get_access_token(),
9494
"expires_in": result.get_access_token_expiry_time(),
95+
"id_token": result.get_raw_id_token(), # New in pymsalruntime 0.8.1
9596
"id_token_claims": id_token_claims,
9697
"client_info": account.get_client_info(),
9798
"_account_id": account.get_account_id(),
@@ -162,6 +163,9 @@ def _signin_interactively(
162163
logger.warning("Using both select_account and login_hint is ambiguous. Ignoring login_hint.")
163164
else:
164165
logger.warning("prompt=%s is not supported by this module", prompt)
166+
if not window:
167+
# This fixes account picker hanging in IDE debug mode on some machines
168+
params.set_additional_parameter("msal_gui_thread", "true") # Since pymsalruntime 0.8.1
165169
if enable_msa_pt:
166170
_enable_msa_pt(params)
167171
for k, v in kwargs.items(): # This can be used to support domain_hint, max_age, etc.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
# The broker is defined as optional dependency,
9292
# so that downstream apps can opt in. The opt-in is needed, partially because
9393
# most existing MSAL Python apps do not have the redirect_uri needed by broker.
94-
"pymsalruntime>=0.8,<0.9;python_version>='3.6' and platform_system=='Windows'",
94+
"pymsalruntime>=0.8.1,<0.9;python_version>='3.6' and platform_system=='Windows'",
9595
],
9696
},
9797
)

0 commit comments

Comments
 (0)