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

Fix AAD silent login problem #173

Merged
merged 1 commit into from
Oct 26, 2021
Merged

Fix AAD silent login problem #173

merged 1 commit into from
Oct 26, 2021

Conversation

Richasy
Copy link
Contributor

@Richasy Richasy commented Oct 26, 2021

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

After logging in to the AAD account, close and reopen the application, the login panel will still pop up instead of silent login.

What is the new behavior?

Store the Authority property of the AAD account correctly, so that account data can be obtained when reading the locally cache.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Sample in sample app has been added / updated (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

Other information

MSA and AAD accounts require different authorization methods. The snippets from this document are as follows:

Notice that we also pass the string "consumers" to the optional authority parameter. This is because Microsoft provides two different types of authentication - Microsoft Accounts (MSA) for "consumers", and Azure Active Directory (AAD) for "organizations". The "consumers" authority indicates we want the MSA option. If you're developing an enterprise app, use the string "organizations" instead.

@ghost
Copy link

ghost commented Oct 26, 2021

Thanks Richasy for opening a Pull Request! The reviewers will test the PR and highlight if there is any merge conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

Copy link
Member

@shweaver-MSFT shweaver-MSFT left a comment

Choose a reason for hiding this comment

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

Looks great!

@shweaver-MSFT shweaver-MSFT merged commit aacc0e1 into CommunityToolkit:main Oct 26, 2021
@Richasy Richasy deleted the anran/fixAADSlient branch October 28, 2021 00:57
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