2

I am using Sitcore 9 and have implemented federated authentication on CM server.

I need to remove normal login authentication , so that the only way that user can be authenticated is form from third party federated authentication.

Any help?

1

Currently, this can't be solved without setting up a different loginpage or modifying the out of the box page, as there is no switch in the sourcecode of this page which hides the forms authentication loginbox.

What you can do, is disable the technical functionality, just by following the guidance within this link:

https://doc.sitecore.net/sitecore_experience_platform/developing/developing_with_sitecore/federated_authentication/using_federated_authentication_with_sitecore

This will disable the formsauthentication module and give an error when credentials are submitted.

So your options are:

  • disable the forms authentication using the previous link (recommended!)

and choose between the following three options:

  • a new login page (en patch all the sites in the node (recommended)
  • overwrite the existing loginpage and remove all the forms authentication html
  • do nothing and keep broken login functionality
  • Thank you for your reply, Could you please advise if there is an article that i can follow to change login page with new one? – NAli Sep 7 '18 at 15:17
  • Disabling the forms authentication didn't work. Setting the authentication mode to None does not disable forms authentication, and removing the FormsAuthentication modules is only mentioned to prevent a few specific issues where the module is present due to custom builds. However, second part of answer is correct, and seems have to override login forms to prevent people from logging in via old forms authentication, at least as far as sitecore 9.0. – Ian Feb 1 '19 at 12:37
0

Your question is a little vague, but have you reviewed the Sitecore configuration instructions?

https://doc.sitecore.net/sitecore_experience_platform/developing/developing_with_sitecore/federated_authentication/using_federated_authentication_with_sitecore

0

You can still achieve it. Very short and simple way of doing it, is by always redirecting user to the federated authentication provider login screen whenever user tries to access Sitecore client application (either using /sitecore or /sitecore/login url) using below processor in httpRequestBegin pipeline.

public class AlwaysRedirectToIDP : HttpRequestProcessor
{
    public override void Process(HttpRequestArgs args)
    {
        if (Context.Site.Name == "login" && !args.HttpContext.User.Identity.IsAuthenticated && HttpContext.Current.Request.UrlReferrer == null)
        {
            HttpContext.Current.GetOwinContext().Authentication.Challenge("xp0.sc.azureAD");
        }
    }
}

I am not saying that this is the best way to achieve it but surely this is the quickest option i can think of right now.

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.