0

In Sitecore 9.1 try to setup the Google Federated identity provider, getting below error, any help appreciated.

The below steps are done, followed steps suggested in Sitecore documentation.

  • Enabled configuration - Sitecore.Owin.Authentication.Enabler.config
  • Inherited Sitecore.Owin.Authentication.Pipelines.IdentityProviders

Error opening the login page.

[MissingMethodException: Method not found: 'Void Sitecore.Owin.Authentication.Pipelines.IdentityProviders.IdentityProvidersProcessor..ctor(Sitecore.Owin.Authentication.Configuration.FederatedAuthenticationConfiguration)'.]
   POC.SitecoreIdentity.IdentityProviders.GoogleAuthentication..ctor(FederatedAuthenticationConfiguration federatedAuthenticationConfiguration) +0
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
   Microsoft.Extensions.DependencyInjection.ConstructorMatcher.CreateInstance(IServiceProvider provider) +464
   Sitecore.Configuration.DefaultFactory.CreateFromServiceProvider(XmlNode configNode, Boolean assert) +481

[ConfigurationException: Could not create object from service provider . Config XML: <processor type="POC.SitecoreIdentity.IdentityProviders.GoogleAuthentication, POC.SitecoreIdentity" resolve="true" patch:source="Sitecore.Owin.Authentication.Enabler.config" xmlns:patch="http://www.sitecore.net/xmlconfig/" />]
   Sitecore.Configuration.DefaultFactory.CreateFromServiceProvider(XmlNode configNode, Boolean assert) +641
   Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +138
   Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, Boolean assert) +68
   Sitecore.Pipelines.CorePipelineFactory.GetObjectFromType(XmlNode processorNode) +91
   Sitecore.Pipelines.CorePipelineFactory.GetProcessorObject(XmlNode processorNode) +145
   Sitecore.Pipelines.CoreProcessor.GetMethod(Object[] parameters) +136
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +470
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +236
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
   (Object , Object ) +14
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +236
   Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
  • 1
    Based on the trace it looks like you have a custom class with a constructor that may be calling a base class. Have you validated that the DLL you compile against for the base class in your project is the same as the one in your bin folder? – Jason St-Cyr Apr 7 '19 at 1:29
2

In Sitecore 9.1, the IdentityProvidersProcessor constructor parameters got changed, you will see additional parameter like ICookieManager, BaseSettings, I missed to use these two parameters on my custom class.

  public class GoogleAuthentication : IdentityProvidersProcessor
    {
            public GoogleAuthentication(FederatedAuthenticationConfiguration federatedAuthenticationConfiguration, ICookieManager cookieManager, BaseSettings settings) : 
            base(federatedAuthenticationConfiguration, cookieManager, settings)
            {

            }

Hope it helps you.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.