Access ExpireTimeSpan property of Owin Cookie Authentication to notify user of login expiry
问题 I am using Owin's cookie authentication to logout users after a time period of inactivity. The thing is, I need to let the user know that their session expires in 'X' minutes. How can I access the authentication cookie to get the time remaining? Is this even possible? Has anybody had to do something like this before? 回答1: It is possible. One way to do that would be to use the OnValidateIdentity callback, which is called every time the cookie is authenticated, which is every time a request is