fix: Allow any SSO validation rather than _all_

This commit is contained in:
Tom Moor
2023-06-29 21:01:05 -04:00
parent c2af5db0f8
commit 73c2a67fa5
3 changed files with 11 additions and 2 deletions

View File

@@ -2,6 +2,9 @@
"extends": [ "extends": [
"../.eslintrc" "../.eslintrc"
], ],
"parserOptions": {
"project": "./tsconfig.json"
},
"overrides": [ "overrides": [
{ {
"files": ["scripts/*"], "files": ["scripts/*"],

View File

@@ -20,14 +20,14 @@ export default class ValidateSSOAccessTask extends BaseTask<Props> {
} }
// Check the validity of all the user's associated authentications. // Check the validity of all the user's associated authentications.
const valid = await Promise.all( const valid = await Promise.any(
userAuthentications.map(async (authentication) => userAuthentications.map(async (authentication) =>
authentication.validateAccess({ transaction }) authentication.validateAccess({ transaction })
) )
); );
// If any are valid then we're done here. // If any are valid then we're done here.
if (valid.includes(true)) { if (valid) {
return; return;
} }

6
server/tsconfig.json Normal file
View File

@@ -0,0 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"lib": ["dom", "es2021", "dom.iterable"],
}
}