diff --git a/plugins/auth-backend/src/service/createCookieAuthErrorMiddleware.ts b/plugins/auth-backend/src/service/createCookieAuthErrorMiddleware.ts index 9b1d20431d..cf7645b081 100644 --- a/plugins/auth-backend/src/service/createCookieAuthErrorMiddleware.ts +++ b/plugins/auth-backend/src/service/createCookieAuthErrorMiddleware.ts @@ -30,7 +30,7 @@ export function createCookieAuthErrorMiddleware(authUrl: string) { if (error) { const { hostname: domain } = new URL(authUrl); - res.clearCookie('auth-error', { + res.clearCookie(AUTH_ERROR_COOKIE, { path: '/api/auth/.backstage/error', domain, });