Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Commit 9b4676c

Browse files
committed
Fix
1 parent 1b57569 commit 9b4676c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/Microsoft.AspNetCore.Authentication.Cookies/CookieAuthenticationHandler.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,17 @@ public override async Task InitializeAsync(AuthenticationScheme scheme, HttpCont
5151

5252
// Cookies needs to finish the response
5353
Context.Response.OnStarting(FinishResponseAsync);
54+
}
5455

55-
Events = Events ?? new CookieAuthenticationEvents();
56+
/// <summary>
57+
/// Creates a new instance of the events instance.
58+
/// </summary>
59+
/// <returns>A new instance of the events instance.</returns>
60+
protected override Task<object> CreateEventsAsync() => Task.FromResult<object>(new CookieAuthenticationEvents());
61+
62+
protected override void InitializeOptions()
63+
{
64+
base.InitializeOptions();
5665

5766
if (String.IsNullOrEmpty(Options.CookieName))
5867
{

0 commit comments

Comments
 (0)