diff --git a/apps/login/src/components/username-form.tsx b/apps/login/src/components/username-form.tsx index 7d18623aba..887c454333 100644 --- a/apps/login/src/components/username-form.tsx +++ b/apps/login/src/components/username-form.tsx @@ -61,11 +61,11 @@ export function UsernameForm({ setLoading(false); }); - if (res?.redirect) { + if (res && "redirect" in res && res.redirect) { return router.push(res.redirect); } - if (res?.error) { + if (res && "error" in res && res.error) { setError(res.error); return; }