Closed AdamCollings closed 3 years ago
Hi @AdamCollings,
I have updated AuthP to work with Azure AD but I haven't released it yet. If you have time could you look at:
Let me know if anything looks iffy before I release this version.
PS. I'm planning on creating a video of how this works because I found setting up the Azure AD quite hard work!
Version 1.3.0 is out and the docs are updated.
While AuthP can be used with any authentication provider by implementing a custom
ISyncAuthenticationUsers
, when executing the finalise methods, such asSetupAspNetCoreAndDatabase
it assumes the application is using cookies andIdentityUser
which makes it unsuitable for services like Azure AD and B2C and causes the following exception.System.AggregateException: 'Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory
1[Microsoft.AspNetCore.Identity.IdentityUser] Lifetime: Scoped ImplementationType: AuthPermissions.AspNetCore.Services.AddPermissionsToUserClaims': Unable to resolve service for type 'Microsoft.AspNetCore.Identity.UserManager
1[Microsoft.AspNetCore.Identity.IdentityUser]' while attempting to activate 'AuthPermissions.AspNetCore.Services.AddPermissionsToUserClaims'.)'`