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

@@ -20,14 +20,14 @@ export default class ValidateSSOAccessTask extends BaseTask<Props> {
}
// 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;
}