We're setting up SSO for our community. It currently works, in that if the user goes to the standard Salesforce login page they are presented with an option log in via SSO.
Which is cool.
But I want them to be able to log in via my custom Angular app sitting on a Visualforce page.
The function executed by the login via SSO button is something like this:
IdpOptions.useIdp( 'SingleSignOnName', 'https://myInstance.force.com/api/saml/authn-request.jsp?saml_request_id=[SAML request Id]&saml_acs=[login url]&saml_binding_type=HttpPost&Issuer=https%3A%2F%2FmyInstance.my.salesforce.com&samlSsoConfig=[configId]&RelayState=[relayState]' );
Here's what I have so far:
The missing components to that url are:
SAML request Id
login url itself has 2 paramters:
I can store the
configId in a custom setting (get it from the url of the Single Sign-On Setting in Setup). Same goes for the
relayState is just the redirect location after the user is logged in.
So all I'm really looking for is how to generate the
SAML request Id. I'm still not entirely sure what it is.