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
Lloyd SilverLloyd Silver 

Force.com Site Login Redirect To External URL

I have a force.com site using authenticated website licenses along with SFDC setup as an identity provider for authentication on a WordPress site.

Users initiate login on the WordPress site at which point they are forwarded to a visualforce page where they can login, and then are redirected back to the WordPress site where they can access protected pages on the WordPress site as well as the force.com site pages.

Login via a visualforce page and then back to the WordPress site is required because of limitations with the authenticated website user license.

Everything works perfectly with one exception.

If the user has forgotten their password, they can click the forgot password link on the visualforce page. They complete the password reset process and are logged into the force.com site.

However, the single signon functionality was interrupted in the process.

So if they try to access the WordPress site's protected pages, they are asked to login again.

The only way I can get around this, as far as I can tell, is to redirect the user to an external URL (on the WordPress site) after they have logged in successfully following the password reset.

How can I do this?

Thanks
Best Answer chosen by Lloyd Silver
Vinit_KumarVinit_Kumar
Why don't you Redirect the user to the WordPress site in the controller method which is being used to Reset password after they have reset the password using Pagereference method.

I mean once they are done with the process redirect them using Pagereference method.

All Answers

Vinit_KumarVinit_Kumar
Why don't you Redirect the user to the WordPress site in the controller method which is being used to Reset password after they have reset the password using Pagereference method.

I mean once they are done with the process redirect them using Pagereference method.
This was selected as the best answer
Lloyd SilverLloyd Silver
Thanks. I wound up just replacing the login form on the forgot password confirmation page with a link to the WP page. But your answer got me there so thanks.
Vinit_KumarVinit_Kumar
Happy to help Lloyd!!

Please mark it as best answer to help others :)
rashmi budakoti 9rashmi budakoti 9
Hi @Vinit_Kumar,

I am redirecting user to the external website after successful login but i need to pass the access token/code and state so that external website can use that access token to fetch user detail from salesforce. how can i achieve this.

Thanks