WKWebView login session remains active when app is killed and relaunched.

In our application, we have a button on click of which we are creating a new WKWebView instance and before loading the url clearing website data using WKWebsiteDataStore removeDataOfTypes method to remove allWebsiteDataTypes.

The problem is when app is relaunched, the login session remains active whereas the same code ends session and we get login page when the same button is clicked when app is in running mode and not killed.

Any suggestion on how to debug or what's going incorrect is really appreciated. Let me know incase of query. Thanks!

WKWebView login session remains active when app is killed and relaunched.
 
 
Q