[SOLVED]Where does WebEngineView save cookies on OS X and how do I keep it from saving cookies?
-
I'm using WebEngineView to log in to a service via Google. The application was originally built on Windows and I'm now in the process of porting it to OS X. Currently, WebEngineView keeps using my old login credentials, and therefore skipping the login phase.
I presume this is because I checked the "keep me logged in" box on one login, and now there is a cookie somewhere that WebEngineView loads every time I try to log in. Since I'd like to allow multiple users to log in from the same desktop, this is becoming a problem and I'd like to delete the first cookie and prevent further cookies from being stored. How do I go about this?
-
@Hertzy You can stop saving cookies by setting a policy:
http://doc.qt.io/qt-5/qml-qtwebengine-webengineprofile.html -
Disregard my previous post, cookies policy can be set in the QWebEngineProfile owned by the QWebEnginePage owned by the QWebEngineView, like this:
ui->webView->page()->profile()->setPersistentCookiesPolicy(QWebEngineProfile::NoPersistentCookies);
The page pointer remains the same for my purposes, at least.