Fix demo code for AddAuthentication.AddCookie

In .Net Core 2.0 using the code as supplied results in an exception, the fix is to pass the scheme name when calling AddCookie.

Fails:
services.AddAuthentication("MyCookieAuthenticationScheme")
        .AddCookie

Works:
Fix demo code for services.AddAuthentication.AddCookie
services.AddAuthentication("MyCookieAuthenticationScheme")
        .AddCookie("MyCookieAuthenticationScheme",
pull/4422/head
Ryan O'Neill 2017-09-27 15:05:58 +01:00 committed by GitHub
parent 4519e5da8d
commit dcf39ad601
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ Complete the following steps:
```csharp
services.AddAuthentication("MyCookieAuthenticationScheme")
.AddCookie(options => {
.AddCookie("MyCookieAuthenticationScheme", options => {
options.AccessDeniedPath = "/Account/Forbidden/";
options.LoginPath = "/Account/Unauthorized/";
});