OpenId ASP MVC Authentication with long expiry

Posted by Khash on Stack Overflow See other posts from Stack Overflow or by Khash
Published on 2010-02-09T17:05:36Z Indexed on 2010/05/15 23:20 UTC
Read the original article Hit count: 519

Stackoverflow uses OpenId as many other websites. However, I rarely need to provide my OpenId to Stackoverflow while with other OpenId enabled websites, I have to do it once a day or week.

This suggests to me that the expiry of the session is with the website and not the OpenId provider.

Looking at the DotNetOpenId code in ASP MVC, I can see that after a successful authentication by the OpenId provider FormsAuthentication.SetAuthCookie is called with the identifier and a boolean parameter to determine if the cookie should be persisted.

How can I force this cookie to expire, say in 2020 instead of whatever the default value is.

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about openid