Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Open URL with js window.open like window in user's default browser?
Forum Updated to NodeBB v4.3 + New Features

Open URL with js window.open like window in user's default browser?

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 448 Views
  • 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.
  • C Offline
    C Offline
    CareF
    wrote on 15 Feb 2019, 20:59 last edited by CareF
    #1

    I am trying to program with QOAuth2AuthorizationCodeFlow. From demos the authorization is performed by

        connect(ptrToQOAuth, &QOAuth2AuthorizationCodeFlow::authorizeWithBrowser, &QDesktopServices::openUrl);
    

    which will open user's default browser for the authorization page.
    However, this has two problems:

    1. I lose control of the opened webpage and cannot close it after authorization finished. JS code window.close in the redirected page cannot close the page in many browsers for security reason.
    2. The page becomes a tab in the browser rather than a popup window.

    One possibility is to open a widget with QWebView and close the window when from QOAuth2AuthorizationCodeFlow class when it receives relevant signals.

    But is there anyway that we can open a popup window with the authorization page, something like js window.open, with user's default browser rather than another Qt Widget, so that OAuth2 provider can use user's cookie.

    1 Reply Last reply
    0

    1/1

    15 Feb 2019, 20:59

    • Login

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