Skip to content
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

Remove check if access_token is not returned for id_token only scenarios #1253

Merged
merged 2 commits into from
Mar 1, 2021
Merged

Remove check if access_token is not returned for id_token only scenarios #1253

merged 2 commits into from
Mar 1, 2021

Conversation

shibayan
Copy link
Contributor

Proposed changes

Remove the check that treated all cases without access_token as errors, and support scenarios with only id_token (mainly Azure AD B2C).
#852

It relies on the following pull request.
AzureAD/microsoft-authentication-library-common-for-objc#952

Type of change

  • Feature work
  • Bug fix
  • Documentation
  • Engineering change
  • Test
  • Logging/Telemetry

Risk

  • High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
  • Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
  • Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

Additional information

@shibayan shibayan requested a review from a team as a code owner February 26, 2021 06:54
@@ -135,10 +135,6 @@ + (MSALResult *)resultWithMSIDTokenResult:(MSIDTokenResult *)tokenResult
}

NSString *accessToken = [authScheme getClientAccessToken:tokenResult.accessToken popManager:popManager error:error];
if (!accessToken)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also update accessToken property in the MSALResult file to be nullable?

It's currently non null here:

@interface MSALResult : NSObject

#pragma mark - Token response

/** The Access Token requested. */
@property (readonly, nonnull) NSString *accessToken;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review. In addition to the properties you pointed out, I've changed the properties that depend on accessToken to nullable

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@oldalton oldalton changed the base branch from dev to external-dev March 1, 2021 19:57
@oldalton oldalton merged commit 2521c4b into AzureAD:external-dev Mar 1, 2021
@shibayan shibayan deleted the idtoken-only branch March 2, 2021 03:10
oldalton added a commit that referenced this pull request Mar 18, 2021
Merging #1253 (Remove check if access_token is not returned for id_token only scenarios)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants