diff --git a/plugins/auth-backend/src/providers/okta/provider.test.ts b/plugins/auth-backend/src/providers/okta/provider.test.ts index 0534bfbb38..588b00be02 100644 --- a/plugins/auth-backend/src/providers/okta/provider.test.ts +++ b/plugins/auth-backend/src/providers/okta/provider.test.ts @@ -106,8 +106,8 @@ describe('createOktaProvider', () => { it('should pass a custom scope to start and refresh requests', async () => { const additionalScopes = 'groups'; - const mockScope = 'openid profile email offline_access groups'; const reqScope = 'openid profile email offline_access'; + const combinedScope = `${reqScope} ${additionalScopes}`; const provider = new OktaAuthProvider({ resolverContext: {} as AuthResolverContext, authHandler: async ({ fullProfile }) => ({ @@ -138,6 +138,6 @@ describe('createOktaProvider', () => { await provider.start(req); const mockCallScope = (mockRedirectStrategy.mock.calls[0] as any)?.[2] ?.scope; - expect(mockCallScope).toBe(mockScope); + expect(mockCallScope).toBe(combinedScope); }); });