File tree Expand file tree Collapse file tree
src/KK.AspNetCore.EasyAuthAuthentication.Sample Expand file tree Collapse file tree Original file line number Diff line number Diff 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 =>
You can’t perform that action at this time.
0 commit comments