From 2a349b81a31d0ada24276e2fba4e66db48f4d0a7 Mon Sep 17 00:00:00 2001 From: Aleksey Belan Date: Sun, 20 Oct 2024 21:47:38 +0300 Subject: [PATCH 1/2] fix: fix bapi url --- libs/platform/auth/src/bapi/feature.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/platform/auth/src/bapi/feature.ts b/libs/platform/auth/src/bapi/feature.ts index 2d2876bd..95df6244 100644 --- a/libs/platform/auth/src/bapi/feature.ts +++ b/libs/platform/auth/src/bapi/feature.ts @@ -9,7 +9,7 @@ import { oauthHandlerComponent, } from '@oryx-frontend/auth'; import { AuthLoginStrategy } from '@oryx-frontend/auth/login'; -import { AppFeature, AppPlugin } from '@oryx-frontend/core'; +import { AppFeature, AppPlugin, injectEnv } from '@oryx-frontend/core'; import { Provider } from '@oryx-frontend/di'; import { provideLitRoutes } from '@oryx-frontend/router/lit'; import { ComponentsInfo } from '@oryx-frontend/utilities'; @@ -78,7 +78,10 @@ export class BapiAuthFeature extends OauthFeature implements AppFeature { provide: CodeGrantAuthLoginStrategyConfig, useFactory: () => ({ - loginUrl: urlJoin('', '/authorize'), + loginUrl: urlJoin( + injectEnv('ORYX_FULFILLMENT_BACKEND_URL') ?? '', + '/authorize' + ), } as CodeGrantAuthLoginStrategyConfig), }, ]; From e5c29120ca235f73e797509bea078a86e3b2900e Mon Sep 17 00:00:00 2001 From: Aleksey Belan Date: Mon, 21 Oct 2024 09:56:38 +0300 Subject: [PATCH 2/2] fix env variable --- libs/platform/auth/src/bapi/feature.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/platform/auth/src/bapi/feature.ts b/libs/platform/auth/src/bapi/feature.ts index 95df6244..c69c8d38 100644 --- a/libs/platform/auth/src/bapi/feature.ts +++ b/libs/platform/auth/src/bapi/feature.ts @@ -79,7 +79,7 @@ export class BapiAuthFeature extends OauthFeature implements AppFeature { useFactory: () => ({ loginUrl: urlJoin( - injectEnv('ORYX_FULFILLMENT_BACKEND_URL') ?? '', + injectEnv('ORYX_BAPI_BACKEND_URL') ?? '', '/authorize' ), } as CodeGrantAuthLoginStrategyConfig),