2

I need to create a link/button to login to salesforce community from external web application. My requirement is external web app needs to be the IDP and OpenId connect should be used as provider type. Due to technology preference, I have to use OpenId only, not SAML.

Looking all the similar posts and salesforce documentation, I am able to create a SSO button in community login page (using Auth provider), which takes me to 3rd party application for login and finally allow me to get into salesforce community.

But instead of community login page, I want that button to display inside the external app, so that user logged in to the external app, can directly login into community without navigating to community login page.

I have referred to the following which are really not helping my problem - https://developer.salesforce.com/forums/?id=906F0000000BMZBIA4

1 Answer 1

0
  1. (if not done) Setup the new Auth Provider of type Open Id Connect in Salesforce based of the settings obtained from the external identity provider

Read further on Configure an Authentication Provider Using OpenID Connect

See screenshot below; for our use case we used a custom Registration Handler class but you can also opt for auto-generating the class (via option Automatically create a registration handler template)

enter image description here

  1. Under Experience cloud site section, Salesforce automatically generates a series of URL based on the name of the auth provider. Communicate the Callback URL to the external identity provider, they need to setup this for the correct redirection

  2. The custom button in the external app then can redirect to the SSO URL of the auth provider https://your-domain/services/auth/sso/YourAuthProviderName which will redirect to your Salesforce community home page after processing the SSO for the user connected to the external app

Side note: If you need to redirect to a specific Community Page after the SSO verification, then the custom button URL can include an additional parameter startURL=/s/your-community-page

The full URL will be similar to this : https://your-domain/services/auth/sso/YourAuthProviderName?startURL=/s/your-community-page

You must log in to answer this question.

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