Open login page of QOAuthAuthorizationCodeFlow with QWebEngineView

  • Hi together,

    i'm trying to solve following problem.


    I'm using the QOAuthAuthorizationCodeFlow to authenticate against a Service. For that a i have an instance oauth_ of the class QOAuthAuthorizationCodeFlow. Ok, then i'm setting all relevant attributes with member variables like:

    // and so on ...

    Then i'm configuring several connects with signals and slots which handle the requests and responses. Everything works fine.
    Now the relevant point. Up to now i used an external browser (firefox) to authenticate against the service. Here the code

    connect(oauth_, &QOAuthAuthorizationCodeFlow::authorizeWithBrowser, &QDesktopServices::opernUrl);

    The grant() function starts the OAuth 2 procedure.

    But i don't want to use the external browser. I have to use the QWebEngineView for authentication. I found this code snippet to open a page:

    QWebEngineView *view_ = new QWebEngineView;

    This also works.

    How can i connect the QWebEngineView with my QOAuthAuthorizationCodeFlow ?
    Anyone some ideas ?

    Thanks in advance

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.