Reputation: 193
I want to be able to use Azure Ad with OpenIdConnect for the authentication in my application which I managed to make it working.
My problem is that when I use in .NET Core 2.0 the OpenIdConnect Authentication and I use this default Identity:
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
When I try to access controllers that have the [Authorize] attribute not being logged in already it redirects me to the azure URL indefinitely.
Any suggestion on how to fix this?
Thanks
Upvotes: 1
Views: 235
Reputation: 14649
The .Net core 2.0 identity should works well with Azure AD authentication via OpenID connect. I also wrote a simple code sample, you can refer it from link below:
You may share some error message or detailed info which block you so that other community could help to troubleshoot this issue.
Upvotes: 2