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/f12dbf59c106906ffdbd69d878add96b.webp?size=256)
Naeem
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/f12dbf59c106906ffdbd69d878add96b.webp?size=256)
Naeem
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/f12dbf59c106906ffdbd69d878add96b.webp?size=256)
Naeem
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/f12dbf59c106906ffdbd69d878add96b.webp?size=256)
Naeem
I'm not getting your point here?