From af3bbb6a9015e437a056e798e24c7f554de7e48b Mon Sep 17 00:00:00 2001 From: Aleksey Belan Date: Mon, 21 Oct 2024 10:01:04 +0300 Subject: [PATCH 1/2] fix envs --- libs/platform/auth/src/bapi/feature.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/platform/auth/src/bapi/feature.ts b/libs/platform/auth/src/bapi/feature.ts index c69c8d38..fb55626e 100644 --- a/libs/platform/auth/src/bapi/feature.ts +++ b/libs/platform/auth/src/bapi/feature.ts @@ -34,14 +34,15 @@ export class BapiAuthFeature extends OauthFeature implements AppFeature { providers: [ { id: 'spryker', - clientId: 'frontend', + clientId: injectEnv('ORYX_BAPI_CLIENT_ID') ?? 'frontend', grantType: 'authorization_code', authUrl: new URL('/login', globalThis.location.origin).toString(), - tokenUrl: urlJoin('', '/token'), + tokenUrl: urlJoin(injectEnv('ORYX_BAPI_BACKEND_URL') ?? '', '/token'), redirectUrl: new URL( '/oauth/cb/spryker', globalThis.location.origin ).toString(), + scope: 'user', }, ], defaultProvider: 'spryker', From b2274cac2d2def391ed5d71f5bfa6417a8d0d3ef Mon Sep 17 00:00:00 2001 From: Aleksey Belan Date: Mon, 21 Oct 2024 10:03:04 +0300 Subject: [PATCH 2/2] fix --- libs/platform/auth/src/bapi/feature.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/libs/platform/auth/src/bapi/feature.ts b/libs/platform/auth/src/bapi/feature.ts index fb55626e..df487f97 100644 --- a/libs/platform/auth/src/bapi/feature.ts +++ b/libs/platform/auth/src/bapi/feature.ts @@ -42,7 +42,6 @@ export class BapiAuthFeature extends OauthFeature implements AppFeature { '/oauth/cb/spryker', globalThis.location.origin ).toString(), - scope: 'user', }, ], defaultProvider: 'spryker',