In Sitecore 9.2, we would like to change some of the CookieAuthenticationOptions, that are used for Authentication.
This is the code we would use:
args.App.UseCookieAuthentication(
new CookieAuthenticationOptions
{
CookiePath = "/",
#if !DEBUG
CookieDomain = ".customdomain.com",
#endif
TicketDataFormat = new TicketDataFormat(new MachineKeyProtector()),
LoginPath = new Microsoft.Owin.PathString("/auth/sso/login"),
LogoutPath = new Microsoft.Owin.PathString("/auth/sso/logout"),
},
// It seems there are issues with the ordering of Forms Authentication (Sitecore) and this OWIN middleware. Therefore we run this middleware
// at the IIS pipeline stage right after Forms Authentication (Authenticate stage) to ensure the order is deterministic.
PipelineStage.PostAuthenticate);
How and where would I hook into the Owin pipeline in Sitecore 9.2 to achieve this?