if (!isLoaded) {
setIsLoading(false);
// We probably need a toast showing that the user has to try again or use a better way.
return;
}
const result = await signIn.create({
identifier: values.username + values.usernameId,
password: values.password,
});
if (result.status === "complete") {
await setActive({ session: result.createdSessionId });
void initialConvexSetup();
router.push("/");
}
if (!isLoaded) {
setIsLoading(false);
// We probably need a toast showing that the user has to try again or use a better way.
return;
}
const result = await signIn.create({
identifier: values.username + values.usernameId,
password: values.password,
});
if (result.status === "complete") {
await setActive({ session: result.createdSessionId });
void initialConvexSetup();
router.push("/");
}