From 36751d7f813174ff80e71a339cd9da8aeed9a5fb Mon Sep 17 00:00:00 2001 From: Ken Date: Mon, 28 Oct 2024 13:29:35 +0800 Subject: [PATCH] feat: capture and redirect on sp on well-known endpoint --- src/app/loaders/express/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/loaders/express/index.ts b/src/app/loaders/express/index.ts index 64a8721bd7..5dc0952f14 100644 --- a/src/app/loaders/express/index.ts +++ b/src/app/loaders/express/index.ts @@ -114,7 +114,13 @@ const loadExpressApp = async (connection: Connection) => { app.use(growthbookMiddleware) } - // jwks endpoint for SP OIDC + /** + * jwks endpoint for SP OIDC + */ + app.use('/sp/.well-known/jwks.json', SpOidcJwksRouter) + /** Legacy route for backward compatibility + * @deprecated TODO(FRM-1893): remove after config on Singpass portal is also updated for Prod + */ app.use('/singpass/.well-known/jwks.json', SpOidcJwksRouter) // Registered routes with sgID app.use('/sgid', SgidRouter)