Skip to content

Commit

Permalink
Merge pull request #231 from camunda/fix-230
Browse files Browse the repository at this point in the history
fix(oauth): uri encode clientId and clientSecret
  • Loading branch information
jwulf authored Aug 21, 2024
2 parents d1ec5b5 + dd8583a commit 9a43a67
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/oauth/lib/OAuthProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,11 @@ export class OAuthProvider implements IOAuthProvider {
}) {
const body = `${this.addAudienceIfNeeded(
audienceType
)}client_id=${clientIdToUse}&client_secret=${clientSecretToUse}&grant_type=client_credentials`
)}client_id=${encodeURIComponent(
clientIdToUse
)}&client_secret=${encodeURIComponent(
clientSecretToUse
)}&grant_type=client_credentials`
/* Add a scope to the token request, if one is set */
const bodyWithScope = this.scope ? `${body}&scope=${this.scope}` : body

Expand Down

0 comments on commit 9a43a67

Please sign in to comment.