diff --git a/.changeset/shiny-geese-watch.md b/.changeset/shiny-geese-watch.md new file mode 100644 index 0000000000..5394a0776d --- /dev/null +++ b/.changeset/shiny-geese-watch.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend-module-microsoft-provider': patch +--- + +Removed `prompt=consent` from start method to fix #20641 diff --git a/plugins/auth-backend-module-microsoft-provider/src/authenticator.ts b/plugins/auth-backend-module-microsoft-provider/src/authenticator.ts index bf2d7fcaba..ba1d75adf8 100644 --- a/plugins/auth-backend-module-microsoft-provider/src/authenticator.ts +++ b/plugins/auth-backend-module-microsoft-provider/src/authenticator.ts @@ -60,7 +60,6 @@ export const microsoftAuthenticator = createOAuthAuthenticator({ async start(input, helper) { return helper.start(input, { accessType: 'offline', - prompt: 'consent', }); }, diff --git a/plugins/auth-backend-module-microsoft-provider/src/module.test.ts b/plugins/auth-backend-module-microsoft-provider/src/module.test.ts index ee7ed8f7f3..2cfedc5d5e 100644 --- a/plugins/auth-backend-module-microsoft-provider/src/module.test.ts +++ b/plugins/auth-backend-module-microsoft-provider/src/module.test.ts @@ -65,7 +65,6 @@ describe('authModuleMicrosoftProvider', () => { expect(startUrl.origin).toBe('https://login.microsoftonline.com'); expect(startUrl.pathname).toBe('/my-tenant-id/oauth2/v2.0/authorize'); expect(Object.fromEntries(startUrl.searchParams)).toEqual({ - prompt: 'consent', response_type: 'code', scope: 'user.read', client_id: 'my-client-id',