auth0-samples / auth0-aspnet-owin-mvc-samples

Quickstart and samples for ASP.NET (OWIN) MVC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicated code in Startup.cs?

jausthalff opened this issue · comments

There seems to be duplicated lines in /Quickstart/01-Login/MvcApplication/MvcApplication/Startup.cs.

Lines 40 and 66 seem redundant and/or misplaced.

The one is for the Cookie middleware, the other for the OpenIdConnect, see the links above each line:

app.UseCookieAuthentication(new CookieAuthenticationOptions
  {
      // More information on why the CookieManager needs to be set can be found here: 
      // https://github.com/aspnet/AspNetKatana/wiki/System.Web-response-cookie-integration-issues
      CookieManager = new SameSiteCookieManager(new SystemWebCookieManager())
  });

  app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
  {
      // More information on why the CookieManager needs to be set can be found here: 
      // https://docs.microsoft.com/en-us/aspnet/samesite/owin-samesite
      CookieManager = new SameSiteCookieManager(new SystemWebCookieManager()),
  )};