debug
This commit is contained in:
@@ -20,8 +20,13 @@ export const options: AuthOptions = {
|
||||
where: { email: credentials.email },
|
||||
});
|
||||
const v1User = (oldUser as OldUser[]).find((u) => u.email === credentials.email);
|
||||
console.log("V1 User", v1User?.publicId);
|
||||
if (!user && v1User) {
|
||||
if (bcrypt.compareSync(credentials.password, v1User.password)) {
|
||||
console.log(
|
||||
"v1 User Passwords match:",
|
||||
bcrypt.compareSync(credentials.password, v1User.password),
|
||||
);
|
||||
const newUser = await prisma.user.create({
|
||||
data: {
|
||||
email: v1User.email,
|
||||
@@ -74,6 +79,7 @@ export const options: AuthOptions = {
|
||||
}
|
||||
return null;
|
||||
} catch (error) {
|
||||
console.error("Error during authorization:", error);
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user