fix: a new email can signin with any password once it's invited to a team (#11359)
Co-authored-by: Shivam Kalra <shivamkalra98@gmail.com>
This commit is contained in:
co-authored by
Shivam Kalra
parent
abc077bfb6
commit
ab39c8f581
@@ -143,7 +143,9 @@ const providers: Provider[] = [
|
||||
if (user.identityProvider !== IdentityProvider.CAL && !credentials.totpCode) {
|
||||
throw new Error(ErrorCode.ThirdPartyIdentityProviderEnabled);
|
||||
}
|
||||
|
||||
if (!user.password && user.identityProvider == IdentityProvider.CAL) {
|
||||
throw new Error(ErrorCode.IncorrectEmailPassword);
|
||||
}
|
||||
if (!user.password && user.identityProvider !== IdentityProvider.CAL && !credentials.totpCode) {
|
||||
throw new Error(ErrorCode.IncorrectEmailPassword);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user