SSO login using WKWebView with a Normal URL without callback feature

I need to perform SSO login using WkWebView and I am not using SFSafariViewController because the URL which I use is a normal web URL and I need to stop loading of next page as soon as I get a ID value in the URL as Query parameter.

Now, When I use WKWebView I am unable to logout the previous session saved in WKWebView itself until I manually clear the cache of it.

is there any way I can sync Safari and WkWebView sessions, So, if I login in WkWebView I can logout the same from Safari.

I have tried using ASWebAuthenticateSession but as I said I need to stop the next page reload.

HELP!!!

SSO login using WKWebView with a Normal URL without callback feature
 
 
Q