"use client"; import { signIn } from "next-auth/react"; import { useState } from "react"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; export default function NextAuthComponent() { const [isLoading, setIsLoading] = useState(false); const handleGoogleSignIn = async () => { setIsLoading(true); try { // Sign in with Google using NextAuth await signIn("google", { callbackUrl: "/auth", }); } catch (error) { console.error("Google sign-in error:", error); setIsLoading(false); } }; return (
By continuing, you agree to our Terms of Service and Privacy Policy.