Skip to main content

Dear community,

 

Please help! We are stuck trying to combine single sign-on (SSO) with custom login pages for a Community.

 

We have configured SSO in Salesforce to point to our client's SSO provider (Active Directory). This works perfectly when using the standard Community login page: you select the appropriate SSO in the Community Administration pages and a button to sign in via SSO automatically appears in the login page. However, we are required to fully customize the login page. When we switch the Community from the standard login page to a custom Visualforce one, there appears to be no way to include the "login via SSO" button. Therefore we must replicate its functionality. We have not been able to find any documentation at all on how to achieve this.

 

Examining network traffic, we found out that Salesforce exposes a page:

(CommunityBaseURL)/saml/authn-request.jsp

A GET request to this page generates a SAML Request which gets sent to the SSO Provider, but we don't see how to use it. First and foremost, the page expects to receive a RequestID that we don't know how to generate.

 

We have found the following Apex Classes that looked like they might be relevant:

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_Auth_AuthConfiguration.htm

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_applauncher_SocialLoginController.htm

...these expose some methods to get SAML providers, but we can't do anything with this--we still see no way to generate a SAML Request like what happens from a standard login page.

 

In the External Identity Implementation Guide, we found the link to an example custom login page on github:

https://github.com/salesforceidentity/basic-custom-login/

...but there we see an example of how to implement Social Sign-on (Ex: facebook) in a custom login page, and nothing applicable for "regular" SAML-based SSO.

 

Has anybody managed to achieve a working SSO integration from a custom login page, or has any idea on how to go about it?

 

Thank you to everyone that took the time to read this!

Ivan

5 comments
0/9000