GİRİŞ YAP

/```javascript
authorize: async (credentials) => {
        let user = null;

        user = await prisma.user.findUnique({
          where: {
            email: credentials.email 
          },
        });

        if (!user) {
          throw new Error("User not found!");
        }

        const match = await bcrypt.compare(credentials.password, user.password);

        if (!match) {
          throw new Error("Wrong credentials!");
        }

        return user;
      },
```

Last updated