-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
Describe the bug
This is really just a naming issue. The provider called "Azure Active Directory B2C" implements authentication against Azure AD which is not the same thing as Azure AD B2C.
Azure AD B2C is a specific product & subset of Azure AD, and comes with additional setup and requirements, including using base URLs and specifying User Flows that are different than used and supported in this provider.
This is extra confusing (blaming MSFT here 😊) because creating an Azure AD B2C tenant (as in the link in the NextAuth docs) creates both an Azure AD instance and allows the creation of App Registrations, so while the intention is to use the Azure AD B2C functionality you could also just use the tenant that's been created for basic Azure AD authentication, which is what's happening with this provider.
Steps to reproduce
I can validate this by going into an Azure AD instance not associated with a B2C tenant and creating an app registration, which I am then able to successfully authenticate against.
Additional context
I'd propose just renaming the provider and adding a different link for the 'Configuration' example (this one: https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app), although I guess this would be a breaking change if people have already implemented the provider as-is? That said, for someone who things they've implemented Azure AD B2C there will likely be a lot of confusion as to why certain B2C features aren't working as expected (including User Flows and the B2C Logout url).
I can submit a PR that either renames the current provider or creates a new provider for 'Azure AD' separately. At some point, though, the 'Azure AD B2C' provider should either be removed or updated to work with B2C functionality.
I can also look at what would be required to update the B2C provider to implement the required B2C features.