diff --git a/packages/core/src/routes/well-known.test.ts b/packages/core/src/routes/well-known.test.ts index 0de4b2eb1..95c90d54a 100644 --- a/packages/core/src/routes/well-known.test.ts +++ b/packages/core/src/routes/well-known.test.ts @@ -100,7 +100,6 @@ describe('GET /.well-known/sign-in-exp', () => { it('should return admin console settings', async () => { interactionDetails.mockResolvedValue({ params: { client_id: adminConsoleApplicationId } }); const response = await sessionRequest.get('/.well-known/sign-in-exp'); - expect(signInExperienceQuerySpyOn).not.toBeCalled(); expect(response.status).toEqual(200); expect(response.body).toMatchObject({ @@ -109,6 +108,7 @@ describe('GET /.well-known/sign-in-exp', () => { ...adminConsoleSignInExperience.branding, slogan: 'admin_console.welcome.title', }, + languageInfo: mockSignInExperience.languageInfo, socialConnectors: [], signInMode: SignInMode.SignIn, }); diff --git a/packages/core/src/routes/well-known.ts b/packages/core/src/routes/well-known.ts index f498340fc..cdde25391 100644 --- a/packages/core/src/routes/well-known.ts +++ b/packages/core/src/routes/well-known.ts @@ -30,6 +30,11 @@ export default function wellKnownRoutes(router: T, pr throw error; }); + const [signInExperience, logtoConnectors] = await Promise.all([ + findDefaultSignInExperience(), + getLogtoConnectors(), + ]); + // Hard code AdminConsole sign-in methods settings. if (interaction?.params.client_id === adminConsoleApplicationId) { ctx.body = { @@ -38,6 +43,7 @@ export default function wellKnownRoutes(router: T, pr ...adminConsoleSignInExperience.branding, slogan: i18next.t('admin_console.welcome.title'), }, + languageInfo: signInExperience.languageInfo, signInMode: (await hasActiveUsers()) ? SignInMode.SignIn : SignInMode.Register, socialConnectors: [], }; @@ -46,10 +52,6 @@ export default function wellKnownRoutes(router: T, pr } // Custom Applications - const [signInExperience, logtoConnectors] = await Promise.all([ - findDefaultSignInExperience(), - getLogtoConnectors(), - ]); const socialConnectors = signInExperience.socialSignInConnectorTargets.reduce< Array