Issue with Google Auth

I am setting up thing as they are in docs but i am getting error when i am doing signup or signin using google i am not able to solve it, help me with this please :-

const handleGoogleSignIn = async () => {
try {
const data = await authClient.signIn.social({
provider: "google"
})

if (data.error) {
throw new Error(data.error.message);
}
} catch (error: unknown) {
console.error("Error while loggingin through Google", error);
toast({
title: "Error",
description:
(error as Error).message || "An error occurred during sign-up.",
variant: "destructive",
});
}
};

socialProviders: {
google: {
clientId: process.env.GOOGLE_CLIENT_ID as string,
clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,
}
},

in auth.ts

POST /api/auth/sign-in/social?currentURL=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Fsign-in 400 in 341ms

getting this how to fix help me
Was this page helpful?