Created
November 1, 2020 23:39
-
-
Save fsanggang/9c265ddad5373128fd4f0134a3eb1006 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Startup.cs | |
| ...etc | |
| using Microsoft.AspNetCore.Authorization; | |
| public void ConfigureServices(IServiceCollection services) | |
| { | |
| ... etc | |
| services.AddDefaultIdentity<IdentityUser>(options => options.SignIn.RequireConfirmedAccount = true) | |
| .AddRoles<IdentityRole>() | |
| .AddEntityFrameworkStores<ApplicationDbContext>(); | |
| } | |
| public void Configure(IApplicationBuilder app, IWebHostEnvironment env, UserManager<IdentityUser> userManager, RoleManager<IdentityRole> roleManager) | |
| { | |
| ... etc | |
| ApplicationInitialiser.Initialise(userManager, roleManager).Wait(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment