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
Ian HildrethIan Hildreth 

Logging Into Salesforce Community Directly From a Wordpress Site

We currently host a public website with wordpress, outside of salesforce. We'd like users to be able to enter their username and password into a form directly on the wordpress site, and upon clicking login, authenticate their credentials with salesforce and redirect the user to the customer community home page.

What's the best way to get this done?

We've currently embedded an iframe on the wordpress site that is hosted by salesforce and written in visualforce to handle the login and redirect to the community, but this comes with issues such as inconsistent behavior in IE11 and the fact that now part of the website is controlled outside of wordpress with its own styles and is therefore more difficult to maintain.

Is it possible to write javascript to connect to the Salesforce API to handle the login and redirect to the community, so there isn't a need for any framing? What is the best practice? 

Providing a button or link to take the user from the wordpress site to a salesforce hosted login page is not an option, it is an absolute requirement that the user can log in to the community without the extra click of navigating to a separate login page.