feat: Implement the ability to login via multiple means when signed up via google/non-cal providers (#14082)

Co-authored-by: zomars <[email protected]>
This commit is contained in:
Anwar Sadathandzomars authored and GitHub committed 2024-04-10 14:38:39 -07:00
1 parent e30b41a85a
commit 4565c3311c
21 files changed
+270 -120

No files matched your search

@@ -31,7 +31,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
return res.status(401).json({ message: "Not authenticated" });
}
if (user.identityProvider !== IdentityProvider.CAL) {
if (user.identityProvider !== IdentityProvider.CAL && !user.password?.hash) {
return res.status(400).json({ error: ErrorCode.ThirdPartyIdentityProviderEnabled });
}