Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

asp.net core 2.0 jwt validate not working when I add service.addidentity

$
0
0

Hi ,

I have an project with normal website and api together,

the API using Jwt token to authorize, it works well with API only .

but when I attach the website login part , add this into services , the API stop working , with 401 authorize error . if I removed this , it works again.

any way to make it works ? 

services.AddIdentity<User, Role>()
                .AddEntityFrameworkStores<ApplicationDbContext>()
                .AddDefaultTokenProviders();


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>