-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merging #952 (Support for scenarios where access_token is not returned) #958
Conversation
Support for scenarios where access_token is not returned
@@ -783,8 +783,7 @@ - (BOOL)saveAccessTokenWithConfiguration:(MSIDConfiguration *)configuration | |||
MSIDAccessToken *accessToken = [factory accessTokenFromResponse:response configuration:configuration]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request does not update changelog.txt.
Please consider if this change would be noticeable to a partner or user and either update changelog.txt or resolve this conversation.
@@ -43,6 +43,11 @@ - (BOOL)validateTokenResult:(MSIDTokenResult *)tokenResult | |||
we'd like to throw an error and specify which scopes were granted and which ones not | |||
*/ | |||
|
|||
if (tokenResult.accessToken == nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use NSString msidIsStringNilOrBlank:token
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed, thanks.
{ | ||
if (error) | ||
{ | ||
*error = MSIDCreateError(MSIDErrorDomain, MSIDErrorInternal, @"Authentication response received without expected accessToken", nil, nil, nil, context.correlationId, nil, YES); | ||
*error = MSIDCreateError(MSIDErrorDomain, MSIDErrorInternal, @"Authentication response received without expected accessToken and idToken", nil, nil, nil, context.correlationId, nil, YES); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, in which scenario the idToken is nil, is it server error or parsing error at client side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely some kind of misconfiguration in case of B2C (so server error).
Shouldn't happen in case of AAD since we always pass in scope=openid.
Proposed changes
Merging a PR from an external contributor: #952
The PR Azure Pipelines checks are not working for forked repos, so opening a new PR to get PR checks completed.
Type of change
Risk
Additional information