Hi,
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:
-
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?
-
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.
Reference:
- [1] User Authentication with Next.js and Strapi
- [2] Client API | NextAuth.js
- [3]
https://github.com/strapi/strapi/blob/master/packages/strapi-plugin-users-permissions/services/Providers.js