I'm trying to get social sign on to work with force.com sites.

The problem is when the user authenticates using Social Sign On, they are automatically redirected to the default portal user home page and the session id is stored on that domain. If you try to redirect to the Force.com Site, the session id cookie doesn't transfer because it is on a different domain.

We have been using the Site.login(user,pass) in the past when creating our own login page but that won't work for the social sign on because we won't have the SF user password.

I was hoping there was a way to override the landing page but haven't had any luck.

This was asked but never answered on the SF developer forum. https://developer.salesforce.com/forums/?id=906F00000009AIdIAM

  • Doing SAML SSO in my org, we faced something similar. I went to Create > Apps > then set the Default Landing Tab to a custom tab that was just a visualforce page with Javascript setting window.top.location.href to the /servlet/networks/switch?networkID value. Commented Jan 2, 2018 at 20:33

1 Answer 1


You can add a site parameter to the SSO Initialization URL to login to a site instead of the default portal/application.

This parameter is documented at https://help.salesforce.com/articleView?id=sso_provider_addl_params_site.htm

You may also want to use the startURL parameter (https://help.salesforce.com/articleView?id=sso_provider_addl_params_start.htm) if you want to redirect to a particular page on that site after authentication.


You must log in to answer this question.

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