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

Initiating the wrong provider if multiple identity providers #7658

Closed
lillheaton opened this issue Feb 13, 2020 · 7 comments · Fixed by #7845
Closed

Initiating the wrong provider if multiple identity providers #7658

lillheaton opened this issue Feb 13, 2020 · 7 comments · Fixed by #7845

Comments

@lillheaton
Copy link
Contributor

When logged in into Umbraco backoffice and trying to link your account with IDP provider. It default initiates/challenge the to one that was last added.

Umbraco version

I am seeing this issue on Umbraco version: 8.5.3

Reproduction

Install

  • UmbracoCms.IdentityExtensions
  • UmbracoCms.IdentityExtensions.AzureActiveDirectory

Configure/Add two different OpenID connections.

Bug summary

Once logged in and trying to "link" (click) one of these, it will always initiate the lastly configured IDP.
(Should be noted that on the login page, the two options are triggered correctly and initiates the one you clicked on)

Specifics

Chrome: Version 79.0.3945.130 - (Have not verified in other browsers)

Steps to reproduce

  • Login with default Umbraco user
  • Click top right user icon
  • Click first IDP connection -> initiates IDP 2
  • Click second IDP connection -> initiates IDP 2 as well

Expected result

  • Login with default Umbraco user
  • Click top right user icon
  • Click first IDP connection -> initiates IDP 1
  • Click second IDP connection -> initiates IDP 2
@nul800sebastiaan nul800sebastiaan added the state/needs-more-info We don't have enough information to give a good reply label Feb 14, 2020
@nul800sebastiaan
Copy link
Member

Thanks, I am not familiar with using identity providers, so I'll have to ask around for you, will get back to you!

@nul800sebastiaan
Copy link
Member

@lillheaton I'm afraid I haven't yet been able to find someone who's more familiar with this. It would be great if you could have a look in the source code to see what might be the culprit here?

@nul800sebastiaan nul800sebastiaan added community/up-for-grabs and removed state/needs-more-info We don't have enough information to give a good reply labels Feb 17, 2020
@umbrabot
Copy link

Hi @lillheaton,

We're writing to let you know that we've added the Up For Grabs label to your issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.

For more information about issues and states, have a look at this blog post

Thanks muchly, from your friendly PR team bot :-)

@lillheaton
Copy link
Contributor Author

I'm embarrassed to admit that I did not see that our vanilla solution had already included a fatal flaw. We were setting the global serializer settings for newtonsoft in our solution - for example camelcase serializeing. This does not run well with Umbraco frontend...

Closeing the issue

@nul800sebastiaan
Copy link
Member

No worries, I always forget about those json settings as well.. Glad it's fixed for you now!

@lillheaton
Copy link
Contributor Author

I might have been a bit too quick to jump the gun here. Removing the default Newtonsoft serializes did in fact fix some issues regards to this. However the original issue of initiating the wrong IDP remains. And from what I could find it should be a easy fix.

onclick="document.forms.oauthloginform.submit();">

It loops out HTML Forms with the same name and then calling document.forms.[name].submit(). So if there are multiple IDP's it will initiate the first in the list.

I can see if I can take a crack at it when I got time. But if anyone who is already familiar with the Umbraco angular build, please go ahead and give it a go :)

@nul800sebastiaan
Copy link
Member

Fixed in #7845

@nul800sebastiaan nul800sebastiaan changed the title Initiating the wrong IDP if multiple identity providers Initiating the wrong provider if multiple identity providers Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants