I started using OpenIddict , and I think this is exactly what you need.
This, in essence, is all the configuration I need:
ConfigureServices:
services.AddIdentity<ApplicationUser, ApplicationRole>() .AddEntityFrameworkStores<ApplicationDbContext>() .AddDefaultTokenProviders() .AddOpenIddictCore<Application>(config => config.UseEntityFramework());
Customization
app.UseOpenIddictCore(builder => {
There are one or two other minor things, for example, your DbContext should flow from OpenIddictContext<ApplicationUser, Application, ApplicationRole, string> .
In this blog post, you can see the full explanation (including links to the github repository): http://capesean.co.za/blog/asp-net-5-jwt-tokens/
Sean Jan 08 '16 at 21:47 2016-01-08 21:47
source share