File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
1
using Microsoft . Identity . Client ;
2
2
using Microsoft . IdentityModel . Protocols . OpenIdConnect ;
3
3
using Microsoft . IdentityModel . Tokens ;
4
+ using Microsoft . Owin . Host . SystemWeb ;
4
5
using Microsoft . Owin . Security ;
5
6
using Microsoft . Owin . Security . Cookies ;
6
7
using Microsoft . Owin . Security . Notifications ;
@@ -29,7 +30,11 @@ public void ConfigureAuth(IAppBuilder app)
29
30
30
31
app . SetDefaultSignInAsAuthenticationType ( CookieAuthenticationDefaults . AuthenticationType ) ;
31
32
32
- app . UseCookieAuthentication ( new CookieAuthenticationOptions ( ) ) ;
33
+ app . UseCookieAuthentication ( new CookieAuthenticationOptions
34
+ {
35
+ // ASP.NET web host compatible cookie manager
36
+ CookieManager = new SystemWebChunkingCookieManager ( )
37
+ } ) ;
33
38
34
39
app . UseOpenIdConnectAuthentication (
35
40
new OpenIdConnectAuthenticationOptions
@@ -58,7 +63,10 @@ public void ConfigureAuth(IAppBuilder app)
58
63
} ,
59
64
60
65
// Specify the scope by appending all of the scopes requested into one string (separated by a blank space)
61
- Scope = $ "openid profile offline_access { Globals . ReadTasksScope } { Globals . WriteTasksScope } "
66
+ Scope = $ "openid profile offline_access { Globals . ReadTasksScope } { Globals . WriteTasksScope } ",
67
+
68
+ // ASP.NET web host compatible cookie manager
69
+ CookieManager = new SystemWebCookieManager ( )
62
70
}
63
71
) ;
64
72
}
You can’t perform that action at this time.
0 commit comments