How to avoid session expired cookie for Owin Federation authentication? RRS feed

  • Question

  • User-102103008 posted

    We are using Cookie and WsFederation middleware to authenticate against ADFS server. Everything is working fine except the generate cookie is always session expired.

    When user close and reopen browser, they need to relogin.

            app.UseCookieAuthentication(new CookieAuthenticationOptions
                AuthenticationType = WsFederationAuthenticationDefaults.AuthenticationType,
                CookieDomain = "...some domain..."
            app.UseWsFederationAuthentication(new WsFederationAuthenticationOptions
                MetadataAddress = ConfigurationManager.AppSettings[AdfsMetadataAddress],
                Wtrealm = ConfigurationManager.AppSettings[AppWtRealm],
                UseTokenLifetime = false

    What are the things that we need to do in order to make cookie persisted in browser side?

    Thanks very much in advance~

    Tuesday, April 12, 2016 8:37 AM