What a insteresting thing i am the one who asked this question and too i am answering this question:
So, i found out that i am not returning anything in signin callback and everything is just perfect. so i added this just after pervious condition of google and github:
if (account.provider === 'credential-provider') {
let existing user = await collection.findOne({email:user.email, password:userpassword)}
if (existingUser) {
return true
} else {
return false
}
}
and the problem is solved, hey stackoverflow if you wanna reach me you can find me by REACH ME this is my link created by my own Website