misc: added oifc checks to signup

This commit is contained in:
Sheen Capadngan
2024-06-20 13:59:50 +08:00
parent ad92565783
commit 3e230555fb
3 changed files with 12 additions and 3 deletions
@@ -574,7 +574,8 @@ export const authLoginServiceFactory = ({
const { authMethod, userName } = decodedProviderToken;
if (!userName) throw new BadRequestError({ message: "Missing user name" });
const organizationId =
(isAuthMethodSaml(authMethod) || authMethod === AuthMethod.LDAP) && decodedProviderToken.orgId
(isAuthMethodSaml(authMethod) || [AuthMethod.LDAP, AuthMethod.OIDC].includes(authMethod)) &&
decodedProviderToken.orgId
? decodedProviderToken.orgId
: undefined;