-
Notifications
You must be signed in to change notification settings - Fork 390
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
Microsoft Login Provider #338
Conversation
8affc6e
to
b1b346b
Compare
- There is an open issue for logout behavior: logout navigates away from current page to login.microsoft.com to fully end the user session. This doesn't match up with other providers: abacritt#306 Signed-off-by: Jon Stelly <967068+jonstelly@users.noreply.github.com>
b1b346b
to
896009e
Compare
user.id = loginResponse.idToken; | ||
user.name = loginResponse.idTokenClaims.name; | ||
user.email = loginResponse.account.username; | ||
user.idToken = loginResponse.idToken; |
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.
user.authToken = ...
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.
Changes are looking good; thank you!
Just to check, there was a comment about needing to set |
Yeah, this one is already merged. You'll probably need to create another PR. While at it, would you please be able to check why the MS login appears to be not working in the demo site? |
Took me a while to get back to this, but new PR submitted to include authToken.
The MS provider works for me with either Do you get any errors in the console? |
I think this is because of configuration of the app. Below is the message I see when trying to use MS provider at https://abacritt.github.io/angularx-social-login/. The URL probably needs to be added in the app settings.
|
Ah, I think this is a trailing slash issue. I had the Azure AD app registration allowing I also added some documentation and other cleanup in #354. Let's continue the conversation there if you're still seeing the issue? |
Resolves: #306
Logout for the Microsoft provider has to navigate to
login.microsoftonline.com
to fully end the user session and log them out. I opened an issue against the MSAL library ( AzureAD/microsoft-authentication-library-for-js#2563 ) so worst case we could do that in a popup like the login and they seem to have had that request a few times already.Configuration
Default configuration looks like the following which is just a flattening of commonly used properties from the MSAL configuration object.
Notes
I set up the Microsoft app with
https://localhost:4200/
as a valid origin so for development/testing I was usingng serve --ssl true
. HTTPS is required for Facebook authentication now but the existing registration that's used for the demo app doesn't seem to have HTTPS from localhost listed as a valid origin (you can see FB errors in the console when loading the demo fromhttp://localhost:4200
). The Microsoft registration seems to work with HTTP or HTTPSI also bumped the demo app to use Font Awesome 5.15.1 so I could use the Microsoft brand icon.