3

I would like to customize community login page. At the same time I have enabled SSO authentication for the community.

Is it possible to add "SSO Login button" to the custom login page?

3 Answers 3

1

Refer this link where it says

Login to Salesforce Org where the custom domain was configured as a Salesforce Administrator and navigate to Setup>>Domain Management>>My Domain. Once the "My Domain" page loads scroll down to the section titled "Login Page Branding" and click edit. Next to the "Authentication Service" section there are two check boxes Login Page and IdentityConnect. Ensure the IdentityConnect checkbox is checked if not check it and Save. Checking this box enables the Identity Connect SSO (Single Sign On) button to show on the domain login screen.

2
  • In this case a SSO login button will be added to the My Domain standard login page. In my case we do not use My Domain functionality. We only use Communities.
    – steals
    Jan 22, 2015 at 11:28
  • This answer is for main login page for internal users. Apr 22, 2021 at 6:00
1

Better to use the getSamlSsoUrl from the AuthConfiguration class:

String communityUrl = '<Site URL of the Community>';
String startUrl = '/s';

Auth.AuthConfiguration authConfig = new Auth.AuthConfiguration(communityUrl, startUrl);

List<SamlSsoConfig> samlConfigList = [SELECT DeveloperName, Id FROM SamlSsoConfig WHERE DeveloperName = : 'SSO Unique Name'];
Id samlId = samlConfigList[0].Id;

String sso = Auth.AuthConfiguration.getSamlSsoUrl(communityUrl, startUrl, samlId);

system.debug(sso);
0

Find the answer by myself.
Go to the Setup -> Single Sign-On Settings
Open required SSO configuration and copy "Identity Provider Login URL" value.
Add regular apex:commandButton and action in the controller that returns Page reference to the "Identity Provider Login URL"

1
  • Did this really work? I think it no longer works??? In our case there are potentially more parameters to inform the IP, of the SP. Apr 22, 2021 at 6:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .