Skip to content

Commit

Permalink
fix: specify the correct audience when getting an Optimize auth token (
Browse files Browse the repository at this point in the history
…#185)

Optimize API calls were not authorized with the correct token audience, leading to a 401 in every case. This is now fixed to use the correct token audience.
  • Loading branch information
pepopowitz authored and jwulf committed Jun 13, 2024
1 parent d8139e6 commit a6a642a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/optimize/lib/OptimizeApiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class OptimizeApiClient {
}

private async getHeaders(auth = true) {
const token = await this.oAuthProvider.getToken('OPERATE')
const token = await this.oAuthProvider.getToken('OPTIMIZE')

const authHeader: { authorization: string } | Record<string, never> = auth
? {
Expand Down

0 comments on commit a6a642a

Please sign in to comment.