Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. Reset WebEngineView user session
Qt 6.11 is out! See what's new in the release blog

Reset WebEngineView user session

Scheduled Pinned Locked Moved Unsolved QtWebEngine
webengineqt5.5.1
2 Posts 1 Posters 3.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ratwix
    wrote on last edited by
    #1

    Hello,

    I use a WebEngineView to disploay a page with google / facebook / twitter... OAuth login page. My goal is to give user the abilities to post a image to their account.

    Several users will use the application.

    My problem : the first user log into google (or other) using OAuth. For the next one, the first user session still active : session is in WebEngine cache.

    How can I "reset" the WebEngineView ? Clear all cache / cookie / session....

    I have already tryed to

    • set "profile.offTheRecord" --> Improvement : when I close and reload the application, login page is shown again --> cache clean
    • Destroy and create dynamicaly the WebEngineView with a Qt.createComponent --> No Improvement
    • Force the profile with a "default profile" (see below) --> No Improvement

    property QtObject defaultProfile: WebEngineProfile {
    storageName: "Default"
    offTheRecord: true
    }

    MyScriptWV.url = url;
    MyScriptWV.createwebViewObjects();
    MyScriptWV.webView.wv.profile = defaultProfile;

    Can someone help me ?

    R 1 Reply Last reply
    0
    • R ratwix

      Hello,

      I use a WebEngineView to disploay a page with google / facebook / twitter... OAuth login page. My goal is to give user the abilities to post a image to their account.

      Several users will use the application.

      My problem : the first user log into google (or other) using OAuth. For the next one, the first user session still active : session is in WebEngine cache.

      How can I "reset" the WebEngineView ? Clear all cache / cookie / session....

      I have already tryed to

      • set "profile.offTheRecord" --> Improvement : when I close and reload the application, login page is shown again --> cache clean
      • Destroy and create dynamicaly the WebEngineView with a Qt.createComponent --> No Improvement
      • Force the profile with a "default profile" (see below) --> No Improvement

      property QtObject defaultProfile: WebEngineProfile {
      storageName: "Default"
      offTheRecord: true
      }

      MyScriptWV.url = url;
      MyScriptWV.createwebViewObjects();
      MyScriptWV.webView.wv.profile = defaultProfile;

      Can someone help me ?

      R Offline
      R Offline
      ratwix
      wrote on last edited by
      #2

      @ratwix I have found the solution : for each new connection, dynamicaly create a new WebEngineProfile with offTheRecord and new storage name (needed ?) and assign it to the current WebEngineView

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved