I am creating some "Remember Me" functionality as part of logging in.
When I create a persistent cookie during the login process with the following:
FormsAuthentication.SetAuthCookie("someusername", true);
And my Web.Config looks as follows:
<authentication mode="Forms">
<forms loginUrl="~/sign-in" timeout="2880" />
</authentication>
How long will the cookie be valid for before the user will be asked to provide their login details again? Also, Is there/What is the default length of time used when setting a persistent cookie?
I found the answer I was looking for thanks to this article:
where he states:
in ASP.NET 2.0 the timeout value of both persistent and session based cookies are controlled by the timeout attribute on the
<forms/>
element
So in my example the persistent cookie will expire in 48 hours.