Skip to content

Commit

Permalink
Use string as scope
Browse files Browse the repository at this point in the history
Using a list of scopes was not spec compliant: thephpleague/oauth2-server#1469

With an update of our oauth lib this is no longer supported, leading to fails in the ATS: shopware/shopware#5986
  • Loading branch information
keulinho authored Jan 24, 2025
1 parent 1c41f15 commit dcddd9c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/services/AdminApiContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class AdminApiContext {
grant_type: 'client_credentials',
client_id: options.client_id,
client_secret: options.client_secret,
scope: ['write'],
scope: 'write',
},
});

Expand All @@ -109,7 +109,7 @@ export class AdminApiContext {
grant_type: 'password',
username: options.admin_username,
password: options.admin_password,
scope: ['write'],
scope: 'write',
},
});

Expand Down Expand Up @@ -150,4 +150,4 @@ export class AdminApiContext {
async head<PAYLOAD>(url: string, options?: RequestOptions<PAYLOAD>): Promise<APIResponse> {
return this.context.head(url, options);
}
}
}

0 comments on commit dcddd9c

Please sign in to comment.