fix: a new email can signin with any password once it's invited to a team (#11359)
Co-authored-by: Shivam Kalra <[email protected]>
This commit is contained in:
1 parent
abc077bfb6
commit
ab39c8f581
1 file changed
+3
-1
@@ -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