I am building a WPF application that uses Microsoft.SharePoint.Client.ClientContext to connect to a SharePoint 2013 site and interact with lists. My SP site uses Windows Authentication, and all users will have normal Active Directory accounts. I have just started looking into authentication via setting the Credentials property of the Client Context. It works, but needs the credentials to be supplied every time the Client Context is instantiated.
My goal is to have a periodic asynchronous process fetching the SharePoint data, without having to prompt the user for credentials every time it runs. Also, I do not want to store the user's password in local storage (I hear that is bad practice).
Is it possible to cache a cookie or authentication token using the client context? I can't seem to find any examples and I'm wondering if it is even possible.