From dcddd9c4eab5958ada8a945239a68ebdc678acaf Mon Sep 17 00:00:00 2001 From: Jonas Elfering Date: Fri, 24 Jan 2025 10:58:58 +0100 Subject: [PATCH] Use string as scope Using a list of scopes was not spec compliant: https://github.com/thephpleague/oauth2-server/issues/1469 With an update of our oauth lib this is no longer supported, leading to fails in the ATS: https://github.com/shopware/shopware/pull/5986 --- src/services/AdminApiContext.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/AdminApiContext.ts b/src/services/AdminApiContext.ts index ba67df21..5d5799df 100644 --- a/src/services/AdminApiContext.ts +++ b/src/services/AdminApiContext.ts @@ -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', }, }); @@ -109,7 +109,7 @@ export class AdminApiContext { grant_type: 'password', username: options.admin_username, password: options.admin_password, - scope: ['write'], + scope: 'write', }, }); @@ -150,4 +150,4 @@ export class AdminApiContext { async head(url: string, options?: RequestOptions): Promise { return this.context.head(url, options); } -} \ No newline at end of file +}