Skip to content

Commit

Permalink
Merge pull request #282 from kkirsche/patch-3
Browse files Browse the repository at this point in the history
Make Salesforce Provider URLs user updatable
  • Loading branch information
bentranter authored Jun 18, 2019
2 parents d72fa8b + 61b5b2d commit 3b80120
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions providers/salesforce/salesforce.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ import (
"golang.org/x/oauth2"
)

const (
authURL string = "https://login.salesforce.com/services/oauth2/authorize"
tokenURL string = "https://login.salesforce.com/services/oauth2/token"
// These vars define the Authentication and Token URLS for Salesforce. If
// using Salesforce Community, you should change these values before calling New.
//
// Examples:
// salesforce.AuthURL = "https://salesforce.acme.com/services/oauth2/authorize
// salesforce.TokenURL = "https://salesforce.acme.com/services/oauth2/token
var (
AuthURL string = "https://login.salesforce.com/services/oauth2/authorize"
TokenURL string = "https://login.salesforce.com/services/oauth2/token"

//endpointProfile string = "https://api.salesforce.com/2.0/users/me"
)
Expand Down Expand Up @@ -110,8 +116,8 @@ func newConfig(provider *Provider, scopes []string) *oauth2.Config {
ClientSecret: provider.Secret,
RedirectURL: provider.CallbackURL,
Endpoint: oauth2.Endpoint{
AuthURL: authURL,
TokenURL: tokenURL,
AuthURL: AuthURL,
TokenURL: TokenURL,
},
Scopes: []string{},
}
Expand Down

0 comments on commit 3b80120

Please sign in to comment.