File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
src/Samples/AspNetCore.Jwt.Sample Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,13 @@ public static void AddCustomIdentityAndKeyConfiguration(this IServiceCollection
1717 services . AddDbContext < MyIntIdentityContext > ( options => options . UseInMemoryDatabase ( "NetDevPack.Identity" ) ) ;
1818
1919 // Your own Identity configuration
20- services . AddCustomIdentity < MyIntIdentityUser , int > ( options =>
20+ services . AddIdentityCore < MyIntIdentityUser > ( options =>
2121 {
2222 options . SignIn . RequireConfirmedEmail = false ;
2323 options . Lockout . MaxFailedAccessAttempts = 5 ;
2424 } )
25- . AddCustomRoles < MyIntIdentityRoles , int > ( )
26- . AddCustomEntityFrameworkStores < MyIntIdentityContext > ( )
25+ . AddRoles < MyIntIdentityRoles > ( )
26+ . AddEntityFrameworkStores < MyIntIdentityContext > ( )
2727 . AddDefaultTokenProviders ( ) ;
2828
2929 // Ours JWT configuration
Original file line number Diff line number Diff line change 1515//builder.Services.AddCustomIdentityConfiguration(builder.Configuration);
1616
1717// When you have specifics configurations (with Key type [see inside this method])
18- builder . Services . AddCustomIdentityAndKeyConfiguration ( builder . Configuration ) ;
18+
19+ builder . Services . AddMemoryCache ( )
20+ . AddCustomIdentityAndKeyConfiguration ( builder . Configuration ) ;
1921
2022// Setting the interactive AspNetUser (logged in)
2123builder . Services . AddAspNetUserConfiguration ( ) ;
You can’t perform that action at this time.
0 commit comments