bug fixed + add support for google profile pics
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user