Associate a Membership Provider with Sitecore
Complete the following procedure to use the Sitecore Commerce 8.1 powered by Commerce Server and Commerce Server 11.3 Profile System to authenticate user profiles, allowing your users to log in using their existing credentials.
Complete the following prerequisites:
This example will setup the UPM provider using the UserObject.GeneralInfo.email_address as the login name.
At your Visual Studio solution setup:
-
Edit the Sitecore
web.configfile at configuration/system.web/membership/providers:-
Add the Commerce Server UPM Membership Provider .
-
Add the Commerce Server switching provider
-
Change the Sitecore membership provider realProviderName to commerceSwitcher
-
-
Edit the
Website\App_Config\Include\CommerceServer.Profiles.configfile-
Add the membership provider info to
/configuration/sitecore/switchingProviders -
Change store full names to false on the profile provider
-
Change the link property to the
GeneralInfo.email_addressproperty
-
-
Modify the Sitecore Commerce 8.1 powered by Commerce Server and Commerce Server 11.3 profile schema:
-
Ensure that the GeneralInfo.email_address column is indexed and set as a primary key
-
Don’t allow email address to be null, and ensure it is unique
-
Remove the index from ExternalID (add a column if its not there)
-
Allow for ExternalID to be null
-
-
Set
ensureAnonymousUserto false for the CommerceUsers domain and add the default profile item id in theSitecore Website\App_Config\Security\Domains.configfile. -
Enable SitecoreUser Manager to create users.
-
Add the following to the Sitecore
web.configfile under/configuration/sitecore/settings -
Remove the
Password QuestionandPassword Answerfrom theSitecore Commerce 8.1 powered by Commerce Server and Commerce Server 11.3 profile schema.NoteIf you wish to keep these properties, you cannot create users through the Sitecore User manager, however, editing/deleting of users will still work.
-