Authentication
Using the Auth Hook
import { useAuth } from "@/hooks/use-auth";
function MyComponent() {
const { user, isAuthenticated, signIn, signOut } = useAuth();
if (!isAuthenticated) {
return <Text>Please sign in</Text>;
}
return <Text>Welcome, {user?.name}!</Text>;
}Using the Session Hook
import { useSession } from "@/hooks/use-session";
function MyComponent() {
const { session, user, isPending } = useSession();
if (isPending) return <Text>Loading...</Text>;
return <Text>Email: {user?.email}</Text>;
}Protected Routes
Routes in (home) are automatically protected. The AuthWrapper component handles redirects based on authentication status.
Source captured: 2026-10-11