Skip to content

Commit

Permalink
Merge pull request #74 from k-capehart/issue-70/fix-test-domain-jwt
Browse files Browse the repository at this point in the history
#70: fix issue when providing test.salesforce.com domain in jwt flow
  • Loading branch information
k-capehart authored Nov 19, 2024
2 parents 2b345db + 84c98b9 commit 4d0aead
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func setAccessToken(domain string, accessToken string) (*authentication, error)

func jwtFlow(domain string, username string, consumerKey string, consumerRSAPem string, expirationTime time.Duration) (*authentication, error) {
audience := domain
if strings.Contains(audience, "sandbox") {
if strings.Contains(audience, "test.salesforce") || strings.Contains(audience, "sandbox") {
audience = "https://test.salesforce.com"
} else {
audience = "https://login.salesforce.com"
Expand Down

0 comments on commit 4d0aead

Please sign in to comment.