auto assign username upon registration

This commit is contained in:
daniel31x13
2024-05-13 00:27:29 -04:00
parent 65b29830f0
commit 341154e928
5 changed files with 20 additions and 117 deletions
-13
View File
@@ -32,19 +32,6 @@ export default function AuthRedirect({ children }: Props) {
router.push("/subscribe").then(() => {
setRedirect(false);
});
}
// Redirect to "/choose-username" if user is authenticated and is either a subscriber OR subscription is undefiend, and doesn't have a username
else if (
emailEnabled &&
status === "authenticated" &&
account.subscription?.active &&
stripeEnabled &&
account.id &&
!account.username
) {
router.push("/choose-username").then(() => {
setRedirect(false);
});
} else if (
status === "authenticated" &&
account.id &&