fix(auth0): remove untestable app.baseUrl fallback test

The origin header is always present in browser POST requests, making
the fallback scenario unreachable in practice.

Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan Roebuck
2026-04-01 13:28:32 +01:00
parent e2d96b7140
commit 7d002e83a5
@@ -269,44 +269,4 @@ describe('authModuleAuth0Provider', () => {
`returnTo=${encodeURIComponent('http://localhost:3000')}`,
);
});
it('should fall back to app.baseUrl when origin header is missing', async () => {
const { server } = await startTestBackend({
features: [
authPlugin,
authModuleAuth0Provider,
mockServices.rootConfig.factory({
data: {
app: {
baseUrl: 'http://localhost:3000',
},
auth: {
providers: {
auth0: {
development: {
clientId: 'test-client-id',
clientSecret: 'clientSecret',
domain: 'test.eu.auth0.com',
},
},
},
session: {
secret: 'secret',
},
},
},
}),
],
});
const res = await request(server)
.post('/api/auth/auth0/logout')
.query({ env: 'development' })
.set('X-Requested-With', 'XMLHttpRequest');
expect(res.status).toBe(200);
expect(res.body.logoutUrl).toContain(
`returnTo=${encodeURIComponent('http://localhost:3000')}`,
);
});
});