From e8199b168497c9b701bb1a8bda835eaaefcf4192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Fri, 19 Apr 2024 13:35:39 +0200 Subject: [PATCH] Move the jwks registration outside of the lifecycle middleware MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/fresh-crews-impress.md | 5 +++++ .../implementations/httpRouter/httpRouterServiceFactory.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/fresh-crews-impress.md diff --git a/.changeset/fresh-crews-impress.md b/.changeset/fresh-crews-impress.md new file mode 100644 index 0000000000..18f98f1dd9 --- /dev/null +++ b/.changeset/fresh-crews-impress.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-app-api': patch +--- + +Move the JWKS registration outside of the lifecycle middleware diff --git a/packages/backend-app-api/src/services/implementations/httpRouter/httpRouterServiceFactory.ts b/packages/backend-app-api/src/services/implementations/httpRouter/httpRouterServiceFactory.ts index 60c6dcd3c0..5e3a26252f 100644 --- a/packages/backend-app-api/src/services/implementations/httpRouter/httpRouterServiceFactory.ts +++ b/packages/backend-app-api/src/services/implementations/httpRouter/httpRouterServiceFactory.ts @@ -75,8 +75,8 @@ export const httpRouterServiceFactory = createServiceFactory( config, }); - router.use(createLifecycleMiddleware({ lifecycle })); router.use(createAuthIntegrationRouter({ auth })); + router.use(createLifecycleMiddleware({ lifecycle })); router.use(credentialsBarrier.middleware); router.use(createCookieAuthRefreshMiddleware({ auth, httpAuth }));