This commit is contained in:
Tom Moor
2023-02-18 14:16:34 -05:00
parent 4805259823
commit 7c05b7326a

View File

@@ -22,17 +22,17 @@ export default class AuthenticationHelper {
return false;
}
// If no team return all possible authentication providers.
if (!team) {
return true;
}
// Guest sign-in is an exception as it does not have an authentication
// provider using passport, instead it exists as a boolean option.
if (config.id === "email") {
return team?.emailSigninEnabled;
}
// If no team return all possible authentication providers except email.
if (!team) {
return true;
}
const authProvider = find(team.authenticationProviders, {
name: config.id,
});