Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-119668

[OAuth] Support custom app URL as the redirect URI

XMLWordPrintable

      Custom URLs schemes can be used to launch mobile apps and send data to apps (https://doc.qt.io/qt-6/qdesktopservices.html#setUrlHandler ). It is also common for OAuth2 to use such custom URLs as the redirect URI (https://www.oauth.com/oauth2-servers/redirect-uris/redirect-uris-native-apps/ ).

       

      Currently, if we want to use a custom redirect URI like myapp://callback, then we would need to:

      1. Implement a custom QAbstractOAuthReplyHandler subclass
      2. Call QDesktopServices::setUrlHandler() to listen for the custom URL
      3. Extract the OAuth2 token from the URL
      4. Pass the token to our custom reply handler

       

      It would be very helpful to have a helper class to take care of the basic steps to achieve this.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            vuokko Juha Vuolle
            skoh-qt Sze Howe Koh
            Vladimir Minenko Vladimir Minenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes