@@ -22,6 +22,7 @@ public CookieAuthenticationOptions()
22
22
ReturnUrlParameter = CookieAuthenticationDefaults . ReturnUrlParameter ;
23
23
ExpireTimeSpan = TimeSpan . FromDays ( 14 ) ;
24
24
SlidingExpiration = true ;
25
+ // To support OAuth authentication, a lax mode is required, see https://github.com/aspnet/Security/issues/1231.
25
26
CookieSameSite = SameSiteMode . Lax ;
26
27
CookieHttpOnly = true ;
27
28
CookieSecure = CookieSecurePolicy . SameAsRequest ;
@@ -59,7 +60,7 @@ public string CookieName
59
60
60
61
/// <summary>
61
62
/// Determines if the browser should allow the cookie to be attached to same-site or cross-site requests. The
62
- /// default is Lax, which means the cookie is only allowed to be attached to cross-site requests using safe
63
+ /// default is Lax, which means the cookie is only allowed to be attached to cross-site requests using safe
63
64
/// HTTP methods and same-site requests.
64
65
/// </summary>
65
66
public SameSiteMode CookieSameSite { get ; set ; }
@@ -85,8 +86,8 @@ public string CookieName
85
86
86
87
/// <summary>
87
88
/// Controls how much time the cookie will remain valid from the point it is created. The expiration
88
- /// information is in the protected cookie ticket. Because of that an expired cookie will be ignored
89
- /// even if it is passed to the server after the browser should have purged it
89
+ /// information is in the protected cookie ticket. Because of that an expired cookie will be ignored
90
+ /// even if it is passed to the server after the browser should have purged it
90
91
/// </summary>
91
92
public TimeSpan ExpireTimeSpan { get ; set ; }
92
93
@@ -100,7 +101,7 @@ public string CookieName
100
101
/// The LoginPath property informs the handler that it should change an outgoing 401 Unauthorized status
101
102
/// code into a 302 redirection onto the given login path. The current url which generated the 401 is added
102
103
/// to the LoginPath as a query string parameter named by the ReturnUrlParameter. Once a request to the
103
- /// LoginPath grants a new SignIn identity, the ReturnUrlParameter value is used to redirect the browser back
104
+ /// LoginPath grants a new SignIn identity, the ReturnUrlParameter value is used to redirect the browser back
104
105
/// to the url which caused the original unauthorized status code.
105
106
/// </summary>
106
107
public PathString LoginPath { get ; set ; }
@@ -118,15 +119,15 @@ public string CookieName
118
119
119
120
/// <summary>
120
121
/// The ReturnUrlParameter determines the name of the query string parameter which is appended by the handler
121
- /// when a 401 Unauthorized status code is changed to a 302 redirect onto the login path. This is also the query
122
- /// string parameter looked for when a request arrives on the login path or logout path, in order to return to the
122
+ /// when a 401 Unauthorized status code is changed to a 302 redirect onto the login path. This is also the query
123
+ /// string parameter looked for when a request arrives on the login path or logout path, in order to return to the
123
124
/// original url after the action is performed.
124
125
/// </summary>
125
126
public string ReturnUrlParameter { get ; set ; }
126
127
127
128
/// <summary>
128
129
/// The Provider may be assigned to an instance of an object created by the application at startup time. The handler
129
- /// calls methods on the provider which give the application control at certain points where processing is occurring.
130
+ /// calls methods on the provider which give the application control at certain points where processing is occurring.
130
131
/// If it is not provided a default instance is supplied which does nothing when the methods are called.
131
132
/// </summary>
132
133
public new CookieAuthenticationEvents Events
0 commit comments