title: Keeping Simple Membership OAuth Session Alive
body: <p>We are using the Simple Membership Provider with ASP.NET MVC 4, and we're using the Facebook Client to provide Facebook login support (similar to <a href="http://www.asp.net/mvc/overview/getting-started/using-oauth-providers-with-mvc" rel="noreferrer">http://www.asp.net/mvc/overview/getting-started/using-oauth-providers-with-mvc</a>).</p>
  
  <p>We have gotten this working, but the session always times out within a day, and we want the login to be persistent, so the user can login and use the service just once.</p>
  
  <p>In the out-of-the-box <em>ExternalLoginCallback</em> function, I am attempting to set the <em>createPersistentCookie</em> parameter to true, but it won't keep the login alive.  Here is the call I am making:</p>
  
  <pre><code>OAuthWebSecurity.Login(result.Provider, result.ProviderUserId, createPersistentCookie: true)
  </code></pre>
  
  <p>Am I going to have to set the Forms Authentication cookie manually in order to accomplish a persistent login? Or is there another way of doing this while still taking advantage of the out-of-the-box Facebook login functionality?</p>