Sign In with Google

Call signIn("google", { callbackUrl: "/dashboard" }) from next-auth/react. NextAuth performs the redirect and callback exchange.

Google button
import { signIn } from "next-auth/react";

export default function GoogleSignInButton() {
  return <button onClick={() => signIn("google", { callbackUrl: "/dashboard" })}>Continue with Google</button>;
}
💡 Ensure /dashboard is an allowed destination.