Azure-Samples/active-directory-dotnet-webapp-openidconnect

What is the expected behavior for posting a form with an expired session

Closed this issue · 2 comments

In this example application, what is the expected behavior when you have a view that shows the user a form and that user's auth token expires before they submit the form?

I know that the owin middleware handles refreshing the auth token in the background, but will the form still post after the auth token is refreshed or will it result in an HTTP GET on the view that has the form (thus loosing the form values and having to start over?)

Steps

  1. Navigate to a view that has a form
  2. Fill out the form but do not submit the form
  3. Wait one hour for the auth token to expire
  4. Submit the form (notice the auth token refresh take place in the address bar of your browser)
  5. Observe the outcome. Did the form actually submit or did the view get refreshed with no values in the input fields, thus losing the data and requiring the user to start over?

The article Controlling a Web App’s session duration discusses this problem and suggests a solution