bug fixed + add support for google profile pics

This commit is contained in:
daniel31x13
2024-05-07 16:59:00 -04:00
parent 2dd49ff844
commit 861f8e55f4
8 changed files with 100 additions and 37 deletions
+14
View File
@@ -1103,6 +1103,20 @@ export default async function auth(req: NextApiRequest, res: NextApiResponse) {
},
callbacks: {
async signIn({ user, account, profile, email, credentials }) {
// console.log(
// "User sign in attempt...",
// "User",
// user,
// "Account",
// account,
// "Profile",
// profile,
// "Email",
// email,
// "Credentials",
// credentials
// );
if (account?.provider !== "credentials") {
// registration via SSO can be separately disabled
const existingUser = await prisma.account.findFirst({