8

After installing 9.1 I see the following error on the login screen:

Error Message

Steps I followed:

  1. Updated XP0-SingleDeveloper with ".dev.sc.local" to the site names
  2. Ran the installation using XP0-SingleDeveloper.ps1 and SIF 2.0
  3. Updated IIS host binding to use https for "sc910.dev.sc.local".
15

After speaking with my friend @kamsar, he pointed out the CORS origin on the Identity Server Instance needs an update.

The Identity Server doesn't allow logging in from just any url, for security reasons.

  • Open the file C:\inetpub\wwwroot\sc910.identityserver.dev.sc.local\Config\production\Sitecore.IdentityServer.Host.xml
  • Add a new AllowedCorsOriginsGroupN
  • Recycle the Identity Server Application Pool

Below you can see the new setting added as Group2:

<AllowedCorsOrigins>
  <AllowedCorsOriginsGroup1>http://sc910.dev.sc.local</AllowedCorsOriginsGroup1>
  <AllowedCorsOriginsGroup2>https://sc910.dev.sc.local</AllowedCorsOriginsGroup2>
</AllowedCorsOrigins>
4

In addition to Michaels correct answer: It is also possible to define the AllowedCorsOrigins pipe-separated. I also stuck on this and found the description in the IdentityServer WDP zip (parameters.xml):

    <parameter name="AllowedCorsOrigins" description="Pipe-separated list of instances (URIs) that are allowed to login via Sitecore Identity.">
      <parameterEntry kind="TextFile" scope="website\\config\\production\\Sitecore.IdentityServer.Host\.xml" match="PlaceholderForClientOriginsGroup" />
    </parameter>

You can define the Origins like that:

      <AllowedCorsOrigins>
        <AllowedCorsOriginsGroup1>http://sc910.dev.sc.local|https://sc910.dev.sc.local</AllowedCorsOriginsGroup1>
        <AllowedCorsOriginsGroup2>http://otherhost.dev.sc.local|https://otherhost.dev.sc.local</AllowedCorsOriginsGroup2>
      </AllowedCorsOrigins>
  • 1
    I see value in using the pipe delimiter in order to make these entries match those from sxa tenants. – Michael West Dec 17 '18 at 13:06
  • 1
    Do you have an example of how to apply this as a patch? Something that can be dropped into a folder? – Michael West Dec 17 '18 at 13:15
  • unfortunately not :( it is set by the XP0-Single-Developer.ps1 --> $AllowedCorsOrigins = "http://$SitecoreSiteName"... maybe you can adjust the script to have more $SitecoreSiteNames – monkey.dsc Dec 18 '18 at 12:12

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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