Differentiating between NextAuth Providers
Unanswered
Sloth bear posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Sloth bearOP
My app allows auth using credentials/google. I'm using the
signIn
callback function for Google but I realise that it gets called when I sign in using credentials as well. Do I not need the authorise
function for credentials in this case? Or is there a proper way of checking for the provider that's calling the function? Thanks!7 Replies
![Avatar](https://cdn.discordapp.com/avatars/782907171721314315/13ada0d1b9a03f777d4286e7cbc36194.webp?size=256)
Naeemgg
you can use
signIn
like this://for google
signIn("google")
//for creds
signIn("credentials",{...})
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Sloth bearOP
Yes that's how I'm using it
![Avatar](https://cdn.discordapp.com/avatars/782907171721314315/13ada0d1b9a03f777d4286e7cbc36194.webp?size=256)
Naeemgg
so what's the issue exactly??
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Sloth bearOP
both
authorize
and signIn
are being called, is that normal?![Avatar](https://cdn.discordapp.com/avatars/782907171721314315/13ada0d1b9a03f777d4286e7cbc36194.webp?size=256)
Naeemgg
yes that's the normal flow of nextAuth
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Sloth bearOP
Okay just clarifying! So I'll just do the checks within
signIn
?![Avatar](https://cdn.discordapp.com/avatars/782907171721314315/13ada0d1b9a03f777d4286e7cbc36194.webp?size=256)
Naeemgg
I'm not getting your point here?