chore: address pr comments
Signed-off-by: Jack Palmer <jackpalmer@spotify.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-auth-backend-module-auth0-provider': minor
|
||||
'@backstage/plugin-auth-backend-module-auth0-provider': patch
|
||||
---
|
||||
|
||||
feat: Add support for organizational invites in auth0 strategy
|
||||
Add support for organizational invites in auth0 strategy
|
||||
|
||||
@@ -175,7 +175,7 @@ describe('authModuleAuth0Provider', () => {
|
||||
'/api/auth/auth0/start?env=development&organization=foo-organization&invitation=foo-invitation',
|
||||
);
|
||||
|
||||
expect(res.status).toEqual(409);
|
||||
expect(res.status).toEqual(400);
|
||||
expect(res.text).toContain(
|
||||
'Organization mismatch. The organization provided in the request does not match the organization configured in the strategy.',
|
||||
);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import Auth0InternalStrategy from 'passport-auth0';
|
||||
import type { StateStore } from 'passport-oauth2';
|
||||
import type express from 'express';
|
||||
import { ConflictError } from '@backstage/errors';
|
||||
import { InputError } from '@backstage/errors';
|
||||
|
||||
/** @public */
|
||||
export interface Auth0StrategyOptionsWithRequest {
|
||||
@@ -58,7 +58,7 @@ export class Auth0Strategy extends Auth0InternalStrategy {
|
||||
this.organization &&
|
||||
organization !== this.organization
|
||||
) {
|
||||
throw new ConflictError(
|
||||
throw new InputError(
|
||||
'Organization mismatch. The organization provided in the request does not match the organization configured in the strategy.',
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user