Skip to content

Commit e488342

Browse files
committed
Add some comments to Startup.cs
1 parent cf7bdb4 commit e488342

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • src/KK.AspNetCore.EasyAuthAuthentication.Sample

src/KK.AspNetCore.EasyAuthAuthentication.Sample/Startup.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,12 @@ public void ConfigureServices(IServiceCollection services)
4141
).AddEasyAuth(
4242
options =>
4343
{
44+
// Override the AuthEndpoint while developing
4445
if (this.Environment.IsDevelopment())
4546
{
47+
// The me.json should be placed in 'wwwroot/auth'
48+
// The Static File Handler will not work with files without extension
49+
// so the endpoint should point to a file with extension
4650
options.AuthEndpoint = "auth/me.json";
4751
}
4852
}
@@ -76,6 +80,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
7680
app.UseStaticFiles();
7781
app.UseSpaStaticFiles();
7882

83+
// Add Authentication middleware before MVC to get it working for MVC routes
7984
app.UseAuthentication();
8085

8186
app.UseMvc(routes =>

0 commit comments

Comments
 (0)