Skip to content

Commit a1fbc6f

Browse files
CopilotbgavrilMS
andauthored
docs: clarify nonce compatibility behavior
Agent-Logs-Url: https://github.com/AzureAD/microsoft-authentication-library-for-python/sessions/d56329c6-d8ad-4440-8617-3df24459fed0 Co-authored-by: bgavrilMS <12273384+bgavrilMS@users.noreply.github.com>
1 parent 5dab5dd commit a1fbc6f

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

msal/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ def acquire_token_by_authorization_code(
12021202
12031203
:param nonce:
12041204
If you provided a nonce when calling :func:`get_authorization_request_url`,
1205-
same nonce can still be provided here for backward compatibility.
1205+
this parameter is ignored and only kept for backward compatibility.
12061206
12071207
:param claims_challenge:
12081208
The claims_challenge parameter requests specific claims requested by the resource provider

msal/oauth2cli/oidc.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ def obtain_token_by_auth_code_flow(self, auth_code_flow, auth_response, **kwargs
195195
"""Validate the auth_response being redirected back, and then obtain tokens,
196196
including ID token which can be used for user sign in.
197197
198+
This method still uses the nonce generated during flow initiation,
199+
but the SDK no longer validates that nonce against the ID token.
200+
198201
It implements PKCE to mitigate the auth code interception attack.
199202
200203
See :func:`oauth2.Client.obtain_token_by_auth_code_flow` in parent class

0 commit comments

Comments
 (0)