legollas007
legollas007

Reputation: 193

.Net Core 2.0 Identity

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

Answers (1)

Fei Xue
Fei Xue

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:

webappLocalAccountAAD

You may share some error message or detailed info which block you so that other community could help to troubleshoot this issue.

Upvotes: 2

Related Questions