Auto log in feature
-
wrote on 21 Jun 2018, 06:14 last edited by
Hello everyone,
I was wondering is there any way that i can auto log into a website having stored my username and password?
For example, if i want to log into facebook, i have a webview nad webdialog that brings me into the sign in page for facebook, how do i manipute the webpage with QT in order to have it automatically type in my password and user name? Thank you so much! -
Hello everyone,
I was wondering is there any way that i can auto log into a website having stored my username and password?
For example, if i want to log into facebook, i have a webview nad webdialog that brings me into the sign in page for facebook, how do i manipute the webpage with QT in order to have it automatically type in my password and user name? Thank you so much!wrote on 21 Jun 2018, 08:24 last edited by@GCDX
The usual way of getting as far as filling in controls (like username/password) on a web page is via cookies. For aQWebView
see http://www.qtcentre.org/threads/21331-How-to-enable-cookie-in-QWebView and http://doc.qt.io/qt-5/qnetworkaccessmanager.html#setCookieJar.If you want to go further and actually auto-login (without pressing a button), you'd probably have to look at either manipulating the page (via JavaScript) to do an auto-
submit
with the controls pre-filled-in, or see if your target web page has a URL syntax or similar to allow username/password credentials to be passed directly by-passing the logon screen.
1/2