diff --git a/packages/features/auth/lib/next-auth-options.ts b/packages/features/auth/lib/next-auth-options.ts index ace33145df..40d240b95f 100644 --- a/packages/features/auth/lib/next-auth-options.ts +++ b/packages/features/auth/lib/next-auth-options.ts @@ -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); }