diff --git a/server/.eslintrc b/server/.eslintrc index b334ec6db..64f81f1ce 100644 --- a/server/.eslintrc +++ b/server/.eslintrc @@ -2,6 +2,9 @@ "extends": [ "../.eslintrc" ], + "parserOptions": { + "project": "./tsconfig.json" + }, "overrides": [ { "files": ["scripts/*"], diff --git a/server/queues/tasks/ValidateSSOAccessTask.ts b/server/queues/tasks/ValidateSSOAccessTask.ts index 857e01857..5d31e7f64 100644 --- a/server/queues/tasks/ValidateSSOAccessTask.ts +++ b/server/queues/tasks/ValidateSSOAccessTask.ts @@ -20,14 +20,14 @@ export default class ValidateSSOAccessTask extends BaseTask { } // Check the validity of all the user's associated authentications. - const valid = await Promise.all( + const valid = await Promise.any( userAuthentications.map(async (authentication) => authentication.validateAccess({ transaction }) ) ); // If any are valid then we're done here. - if (valid.includes(true)) { + if (valid) { return; } diff --git a/server/tsconfig.json b/server/tsconfig.json new file mode 100644 index 000000000..be28246c9 --- /dev/null +++ b/server/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "lib": ["dom", "es2021", "dom.iterable"], + } +} \ No newline at end of file