0

After publishing the fresh Habitat project to sitecore 9.1.1 freash instance I am facing the below error. I tried but failed to solve this issue.

Any help would be appreciated.

**Cannot create identity provider with nonexistent sitecore domain "facebook"

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Cannot create identity provider with nonexistent sitecore domain "facebook"

Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.**

1

Please check your patch config file , under the identityproviders section , there identiyprovider id and param is set to facebook.

<identityProviders hint="list:AddIdentityProvider">
        <identityProvider id="**AzureAdB2C**" type="Sitecore.Owin.Authentication.Configuration.DefaultIdentityProvider, Sitecore.Owin.Authentication">
          <param desc="name">**AzureAdB2C**</param>
          <param desc="domainManager" type="Sitecore.Abstractions.BaseDomainManager" resolve="true" />
 <caption>AzureAdB2C</caption>

You could either change it to Sitecore or create a new domain in Sitecore -> domain manager with the name "facebook"

In above example , i have used AzureAdB2c as name of IdentityProvider and domain. Please change according to your setup.

0

I found solution which allow me to run the sitecore without Facebook authentication.

Need to comment the below line in Feature.Accounts.config file. This helped me to solve my issue.

<identityProvider id="Facebook" type="Sitecore.Owin.Authentication.Configuration.DefaultIdentityProvider, Sitecore.Owin.Authentication">
                <param desc="name">Facebook</param>
                <param desc="domainManager" type="Sitecore.Abstractions.BaseDomainManager" resolve="true" />
                <caption>Facebook</caption>
                <domain>facebook</domain>
                <transformations hint="list:AddTransformation">
                </transformations>
            </identityProvider>

and

<owin.identityProviders>
            <processor type="Sitecore.Feature.Accounts.Infrastructure.Pipelines.IdentityProviders.Facebook, Sitecore.Feature.Accounts" resolve="true" />
        </owin.identityProviders>

In Habitat.Website.config comment the below line

<identityProvidersPerSites>
            <mapEntry name="habitat" type="Sitecore.Owin.Authentication.Collections.IdentityProvidersPerSitesMapEntry, Sitecore.Owin.Authentication" resolve="true">
                <sites hint="list">
                    <site>habitat</site>
                </sites>
                <identityProviders hint="list:AddIdentityProvider">
                    <identityProvider ref="federatedAuthentication/identityProviders/identityProvider[@id='Facebook']"/>
                </identityProviders>
                <externalUserBuilder type="Sitecore.Owin.Authentication.Services.DefaultExternalUserBuilder, Sitecore.Owin.Authentication" resolve="true">
                    <param desc="isPersistentUser">true</param>
                </externalUserBuilder>
            </mapEntry>
        </identityProvidersPerSites>

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.