//aita error dekhacce
[ Server ] Error: Read more at https://errors.authjs.dev#callbackrouteerror
export async function doCredentialLogin(formData) {
11 | try {
12 | const response = await signIn("credentials", { // error dekhacce ekhane
| ^
13 | email: formData.get("email"),
14 | password: formData.get("password"),
15 | redirect: true,
"use server";
import { signIn, signOut } from "@/auth";
import { revalidatePath } from "next/cache";
export async function doLogout() {
await signOut({ redirectTo: "/" });
}
export async function doCredentialLogin(formData) {
try {
const response = await signIn("credentials", {
email: formData.get("email"),
password: formData.get("password"),
redirect: true,
});
revalidatePath("/");
return response;
} catch (err) {
console.error("Login error:", err);
throw err;
}
}
//aita error dekhacce
[ Server ] Error: Read more at https://errors.authjs.dev#callbackrouteerror
export async function doCredentialLogin(formData) {
11 | try {
"use server";
import { signIn, signOut } from "@/auth";
import { revalidatePath } from "next/cache";
export async function doLogout() {
await signOut({ redirectTo: "/" });
}
export async function doCredentialLogin(formData) {
try {
const response = await signIn("credentials", {
email: formData.get("email"),
password: formData.get("password"),
redirect: true,
});
revalidatePath("/");
return response;
} catch (err) {
console.error("Login error:", err);
throw err;
}
}