diff --git a/.changeset/spicy-words-sing.md b/.changeset/spicy-words-sing.md new file mode 100644 index 0000000..eaccb6b --- /dev/null +++ b/.changeset/spicy-words-sing.md @@ -0,0 +1,5 @@ +--- +"create-better-t-stack": patch +--- + +Redirect unauthenticated users to login page instead of home diff --git a/apps/cli/template/with-auth/packages/client/src/routes/dashboard.tsx b/apps/cli/template/with-auth/packages/client/src/routes/dashboard.tsx index a66ba4b..d6ecac9 100644 --- a/apps/cli/template/with-auth/packages/client/src/routes/dashboard.tsx +++ b/apps/cli/template/with-auth/packages/client/src/routes/dashboard.tsx @@ -17,7 +17,7 @@ function RouteComponent() { useEffect(() => { if (!session && !isPending) { navigate({ - to: "/", + to: "/login", }); } }, [session, isPending]);