Hot answers tagged

9

I finally managed to get both Sitecore login (standard) and enduser login (Azure B2C AD) to work at the same time. I did a few changes and I am not 100% sure exactly which of them made the difference, so I will just list them and post the working code. Changes: Moved the Feature.AzureB2C.config (config file for Identity provider) out of a "zFeature" folder ...


4

using different domains for front- and backend is the most simple one. Cookies won't be shared between those domains.


4

There a few reasons why you are facing these issues: You are using the [Authorize] Attribute You are doing an own mapping Sitecore, Identity & Owin do work a little bit different that you would expect The way Sitecore, Owin & Identity works Sitecore has created a piece of pipelines and stagemarkers which are run during initialization of Sitecore. ...


4

Treat it as a comment. I don't have enough reputation to make a real one. Have you specified allowed sites for your external identity provider in the corresponding federatedAuthentication/identityProvidersPerSites/mapEntry node? This node must have sites sub node that contains a list of site names for which users will have access if they are authenticated ...


2

After play around in the config files, I found there is a flag inside the web.config where contains the <add key="owin:AutomaticAppStartup" value="false" />. I changed it to true value then the owin.initialize pipeline turns on. Update I would like to share more details about this issue. Please remind that in the web.config already have a setting ...


2

I think the code looking to instantiate your processor, is asking for the parameter-less constructor. Since you've not specified much around instantiation, this more or less has to be the case. 1) You're not following the cited Sitecore Guide which states: To create a new processor: Inherit the Sitecore.Owin.Authentication.Pipelines....


2

Not sure if I understood your question correctly , but every middlewware can inject or implement its own cookieauthentication options. see below code and this questions - How to get Sitecore.Context.User after redirect from Azure ADb2c login? protected override void ProcessCore(IdentityProvidersArgs args) { // Required for Azure webapps, ...


1

I ended up adding a check inside RedirectToIdentityProvider to stop processing if the request context was invalid for my site. I had to check for the presence of the site name in the URL as well as the identity provider callback URL. RedirectToIdentityProvider = notification => { if (!IsValidPath(notification.Request)) { notification....


1

I faced a similar issue and i came across this post which resolves the current issue: Could not find configuration node: federatedAuthentication/sharedTransformations/setIdpClaim Note: There might be other issues. This answer solves the issue you have mentioned above. Incase the post disappears here is the answer (use this instead): Before: <...


1

It turns out, the class MyNamespace.MyOwnProcessor was referenced in another part of the config file - one where it didn't belong. Lesson learned - check for all occurrences of your type when getting the "No matching constructor was found" error.


1

The other answer wasn't clear on exactly the problem, I came across this in an Auth0 B2C integration and removing these from the IdentityProviderProcessor fixed it. I think these may already be getting registered by Sitecore. args.App.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType); args.App....


1

In the end, I opted to create a page with just a controller rendering on it that handles checking logged in status, returning an HttpUnauthorizedResult if you aren't, which kicks off OWIN and the WsFederation login process. The effect is the same and even gives me more freedom in handling redirecting the user back into their workflow. public ActionResult ...


Only top voted, non community-wiki answers of a minimum length are eligible