fixed login route and updated file name
This commit is contained in:
parent
d15ff5b03e
commit
988a24e208
@ -5,10 +5,10 @@ import { DrizzleAdapter } from "@auth/drizzle-adapter";
|
||||
import { db, connection } from "@/db/db";
|
||||
import { users } from "@/db/schema";
|
||||
import { eq } from "drizzle-orm";
|
||||
import isValidCredentials from "zod";
|
||||
|
||||
|
||||
const handler = NextAuth({
|
||||
adapter: DrizzleAdapter(db),
|
||||
// adapter: DrizzleAdapter(db),
|
||||
session: {
|
||||
strategy: "jwt",
|
||||
},
|
||||
@ -43,7 +43,10 @@ const handler = NextAuth({
|
||||
console.log({ passwordCheck });
|
||||
|
||||
if (passwordCheck) {
|
||||
return response[0];
|
||||
return {
|
||||
id: response[0].id,
|
||||
email: response[0].email,
|
||||
};
|
||||
}
|
||||
return null;
|
||||
},
|
||||
Loading…
Reference in New Issue
Block a user