mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Fix lint errors
This commit is contained in:
@@ -71,8 +71,7 @@ export const completeAccountSignup = async (req: Request, res: Response) => {
|
|||||||
if (providerAuthToken) {
|
if (providerAuthToken) {
|
||||||
await validateProviderAuthToken({
|
await validateProviderAuthToken({
|
||||||
email,
|
email,
|
||||||
providerAuthToken,
|
providerAuthToken
|
||||||
user,
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const [AUTH_TOKEN_TYPE, AUTH_TOKEN_VALUE] = <[string, string]>req.headers["authorization"]?.split(" ", 2) ?? [null, null]
|
const [AUTH_TOKEN_TYPE, AUTH_TOKEN_VALUE] = <[string, string]>req.headers["authorization"]?.split(" ", 2) ?? [null, null]
|
||||||
@@ -117,16 +116,8 @@ export const completeAccountSignup = async (req: Request, res: Response) => {
|
|||||||
if (!user)
|
if (!user)
|
||||||
throw new Error("Failed to complete account for non-existent user"); // ensure user is non-null
|
throw new Error("Failed to complete account for non-existent user"); // ensure user is non-null
|
||||||
|
|
||||||
const hasSamlEnabled = user.authMethods
|
const hasSamlEnabled = user.authMethods.some((authMethod: AuthMethod) => [AuthMethod.OKTA_SAML, AuthMethod.AZURE_SAML, AuthMethod.JUMPCLOUD_SAML].includes(authMethod));
|
||||||
.some(
|
|
||||||
(authMethod: AuthMethod) =>
|
|
||||||
[
|
|
||||||
AuthMethod.OKTA_SAML,
|
|
||||||
AuthMethod.AZURE_SAML,
|
|
||||||
AuthMethod.JUMPCLOUD_SAML
|
|
||||||
].includes(authMethod)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!hasSamlEnabled) { // TODO: modify this part
|
if (!hasSamlEnabled) { // TODO: modify this part
|
||||||
// initialize default organization and workspace
|
// initialize default organization and workspace
|
||||||
await initializeDefaultOrg({
|
await initializeDefaultOrg({
|
||||||
|
|||||||
Reference in New Issue
Block a user