function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
tonantetonante 

How to get Site.Login() return URL to Redirect to an External Page (Is there An Alternative?)

 

HI I need Help with Site.Login and page redirects:

 

As I understand it, Site.login() uses startURL as a third parameter but startURL only contains paths to the Sites local pages.

 

Is there anyway that I could do a standard login using site.Login() and then have that call an external page? (i.e.. Somehow incorporate a Page redirect using the external StartURL).

 

 I am not performing another login at the external site. I just need to have the  login redirect the user to that external page. From there they can manually log in on that page.

 

 Thanks much for your help.

Best Answer chosen by Admin (Salesforce Developers) 
tonantetonante

We're going to try a SOAP WSDL by generating the WSDL into a set of classes and using the Response, Request, and WSDL classes by making a callout right after the Site.changePassword() method call located in the modified ChangePassword controller class method.

If anone has an easier way please let me know.  Thanks

All Answers

tonantetonante

We're going to try a SOAP WSDL by generating the WSDL into a set of classes and using the Response, Request, and WSDL classes by making a callout right after the Site.changePassword() method call located in the modified ChangePassword controller class method.

If anone has an easier way please let me know.  Thanks

This was selected as the best answer
rashmi budakoti 9rashmi budakoti 9
Hi,

I have a same requirement  where i need to redirect the user to external website after successful login. We are using salesforce as IDP and using salesforce communities login page. is there any way to provide external website url in StartUrl parameter of site.login.

Thanks