# Set up Salesforce auth using OAuth2 basic support plugin

**URL:** https://meta.discourse.org/t/set-up-salesforce-auth-using-oauth2-basic-support-plugin/44889
**Category:** Integrations
**Tags:** sso, how-to
**Created:** [May 27, 2016, 8:22am UTC](https://meta.discourse.org/t/set-up-salesforce-auth-using-oauth2-basic-support-plugin/44889 "2016-05-27T08:22:04Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![pacharanero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pacharanero/32/500583_2.png) [@pacharanero](https://meta.discourse.org/u/pacharanero)
#### Post date: [March 19, 2020, 3:53am UTC](https://meta.discourse.org/t/set-up-salesforce-auth-using-oauth2-basic-support-plugin/44889/2 "2020-03-19T03:53:09Z")

</div>

Thanks for this post, which was invaluable in setting up a recent project, which required Salesforce login.

In our case, the Salesforce app was a Community, which meant we had to change some of the details above. I’m posting on this old thread in case it helps anyone else. It nearly broke my brain for a whole day.

- oauth2 authorize url: `https://[COMMUNITY_NAME].force.com/services/oauth2/authorize`
- oauth2 token url: `https://[COMMUNITY_NAME].force.com/services/oauth2/token`
- oauth2 callback user id path: `id`

The path changes were worked out gradually (and painfully) from Salesforce and other documentation:  
[https://auth0.com/docs/connections/social/salesforce](https://auth0.com/docs/connections/social/salesforce)  
[Salesforce Help](https://help.salesforce.com/articleView?id=remoteaccess_oauth_endpoints.htm&type=5)

However we still had problems with 403 Forbidden errors, which were plain unstyled HTML and didn’t look very much like a Discourse error to me, which led to much debugging of Salesforce and gnashing of teeth. But the problem _was_ in Discourse.

> # Forbidden
> 
> You don’t have permission to access this resource.
> 
> Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Although the redirect to Callback URL seemed to be working, the browser console registered authentication failures. In the end it was the **unset** `oauth2 callback user id path` which was the cause of the authentication failure. Setting it to `id` fixed everything.

All other settings as in previous post.

---

_[View the full topic](https://meta.discourse.org/t/set-up-salesforce-auth-using-oauth2-basic-support-plugin/44889)._
