Support for multiple Auth Providers


I’m trying to use NextAuth for authentication for a NextJS and Strapi setup.

I’ve followed [1] to set things up and it’s working fairly well for the most part. That said, I’ve run into several issues that I’m not sure how to resolve:

  1. It appears that Strapi doesn’t support having a single email associated with multiple providers. For example, a user could choose to log in once via Google and once via Facebook. Ideally, both login methods should lead the user to be logged in with the same user account. Is single-user / multiple-provider something that is planned?

  2. When using the email sign-in method of NextAuth (See [2] - it’s basically a magic-link based login), I assume we need to perform a call to Strapi at /api/auth/<provider>/callback to ensure the user gets registered. That said, I don’t see an appropriate provider for this (See [3]). Is there anything I’m missing to make this login method work?

Happy to provide more details if needed.


1 Like

Hey @boop

At the moment you are correct, we can’t properly handle multiple auth providers for a user, we have an open feature request for this here: Multiple authentication providers per user - Roadmap | Product Roadmap

See strapi/strapi#10746 for issue #2.


The board doesn’t seem to be publicly accessible. Is there any update on this?

We are experiencing same issue here regarding different login method for each provider.
Without being able to link accounts to multiple providers it’s a high maintenance job to keep track of things. Now we have to show users appropriate error messages when they choose to login using a different method than the one they used for sign up.
It has appeared to be a limitation to them.