Comprehensive admin + user dashboards (production-ready)
This commit is contained in:
@@ -10,12 +10,14 @@ import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card";
|
||||
import { signIn } from "@/lib/auth/auth-client";
|
||||
import { safeRedirect } from "@/lib/utils";
|
||||
import { GoogleButton } from "./google-button";
|
||||
|
||||
export function SignInForm({ googleEnabled }: { googleEnabled: boolean }) {
|
||||
const router = useRouter();
|
||||
const params = useSearchParams();
|
||||
const redirectTo = params.get("redirect") || "/dashboard";
|
||||
// Validate the ?redirect param to prevent open-redirect attacks.
|
||||
const redirectTo = safeRedirect(params.get("redirect"));
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
async function onSubmit(e: React.FormEvent<HTMLFormElement>) {
|
||||
|
||||
Reference in New Issue
Block a user