fix: Do not forward to a disabled authentication provider when attempting to sign-in with email
This commit is contained in:
@@ -86,10 +86,12 @@ router.post(
|
||||
const authProvider = find(team.authenticationProviders, {
|
||||
id: user.authentications[0].authenticationProviderId,
|
||||
});
|
||||
ctx.body = {
|
||||
redirect: `${team.url}/auth/${authProvider?.name}`,
|
||||
};
|
||||
return;
|
||||
if (authProvider?.enabled) {
|
||||
ctx.body = {
|
||||
redirect: `${team.url}/auth/${authProvider?.name}`,
|
||||
};
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!team.emailSigninEnabled) {
|
||||
|
||||
Reference in New Issue
Block a user