I hesitated before writing this question, as it sounds like I'm after an opinion without trying anything yet. That's not the case, I just don't want to go down the wrong route with architecture - it needs planning well in advance and I don't want to fall victim to the XY problem.I have a web-app. It's a 'thin' HTML and javascript client, making AJAX requests to my asp .net MVC solution. All's well, but I need to add offline capability to this app by making use of localstorage and the HTML5 application cache, which means I'm going to provide the form, and let the user submit it if they have a connection. If they do, and it posts to the server - at what point do I authenticate? How do I authenticate if it's just a HTTP post request?I'm pretty new to MVC, I understand WebForms carried a lot of 'behind the scenes' stuff in the view state, some of which may have been used for authentication? But I don't know how I can pass authentication data to an MVC controller. More importantly, I don't know if I'm approaching these requirements right. Should I have  a separate 'offline' form that will never even attempt to send off the data to the server and send it later on from a different section? Or is it common to check if a user is authenticated or not from their AJAX request?
How do I handle authentication in an ASP.NET webapp with offline-capable client code?
c#;architecture;web applications;mvc;ajax