Salesforce Custom Auth Provider Plugin for Login.Gov
- Class: LoginDotGov.cls
- Class: LoginDotGovTestClass.cls
- MDT: LoginDotGov_mdt
Auth Provider Plugin designed to allow Login.gov as an IDP for Salesforce. Once Deployed do the following:
- Create or upload a certificate in Salesforce. Setup->Security->Certificatate and Key Management
- Setup an app with Login.gov. Use the certificate created in step 1.
- Create a remote site setting for Login.gov's endpoint
- Create a new Auth Provider - you should see LoginDotGov as a choice.
- Create a new Registration Handler according to your needs. Use this class as the Registration Handler for the Auth Provider setup. (You can choose to have one auto created in the Auth Provider Setup)
- For native MyDomain Salesforce login, check the new Auth Provider as an option under the My Domain Authentication Configruation. For other uses, such as a community, use the URL's provided in the Auth Provdier configuation.
- be sure to use lowercase values for any parameters and the redirect and callback URI. Also make sure the URL Suffix value of the Auth Provider under setup is lowercase. Login.gov will respond with everything in lowercase which causes Chrome to deny due to CSP if the case is mixed