I'm trying to create a redirect to a relative url within my community from the login page. I've managed to successfully do so using normal login/registration methods, but am having trouble with social login/registration. I have read the documentation on startURL here: https://support.salesforce.com/articleView?id=sso_provider_addl_params_start.htm&type=5, but there is some ambiguity that, if cleared up, may help.

Using the standard Facebook and Google auth provider configurations, I have located the "Single Sign-On Initialization URL" parameter within the auth provider detail. It is, however, a generated output field that I cannot modify. This leads me to believe that the standard social login component I am using with Community Builder utilizes the url to navigate. Although I have been able to retrieve the source for the loginForm component and customize it, I have not been able to do so with the socialLogin componet.

My main questions are:

  1. Can I achieve a redirect with the standard social login component via configuration only?

  2. If not, can I customize the "Single Sign-On Initialization URL" that is generated in the auth provider detail?

  3. If not, can I customize the socialLogin component?

Thank you in advance

  • 2
    Can you tell us more about the purpose of the redirect you're trying to create - is it to customize user experience based on some criteria (inbound source, customer type, etc)? If the length of the parameter string is less than 30 characters, I think I can help you.
    – crmprogdev
    Commented Aug 5, 2018 at 20:47
  • I am redirecting to a custom application page I have created in the community depending on the login type, all I really need is the startUrl to accomplish this, which should be below 30 characters in this case.
    – Jalal Khan
    Commented Aug 6, 2018 at 14:16
  • I think it goes without saying that a public facing community has deep links and then when a user wishes to sign up or login in they should be taken back to the page where they clicked on the login/signup button. No brainer. Jalal, did you solve this? If I find the answer I will respond here. Commented Apr 16, 2021 at 7:08

1 Answer 1


You can extend an endpoint, including a redirect using the experience ID or Expid URL parameter as it's also referred to. The best place I know of that will give you even more examples of how to use and implement it besides the section of the Salesforce Help I've already linked you to is the Salesforce External Identity Implementation Guide. I recommend you search on Expid within that document as there are a number of ways to implement it.

It can be added to your redirect in a number of ways. I'd expect you to want to be able to handle the callback from the redirect at that endpoint. For that reason, I think you'll want to look at the section on Embedded Login: Allow Visitors to Log In to Your Web Pages that covers client side and server side callbacks.

You must log in to answer this question.

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