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. connection with google on Qt
Qt 6.11 is out! See what's new in the release blog

connection with google on Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 2 Posters 2.2k 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.
  • E Offline
    E Offline
    EL-jos
    wrote on last edited by
    #3
    This post is deleted!
    1 Reply Last reply
    0
    • SGaistS SGaist

      Hi,

      Might be a silly question but are you sure the callback URL is correct ?

      E Offline
      E Offline
      EL-jos
      wrote on last edited by
      #4

      @SGaist Thank you for your reply,

      here is my redirection URL:
      "http://127.0.0.1:1234/"

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #5

        @EL-jos said in connection with google on Qt:

        qt.networkauth.oauth2: Unexpected call

        This stack overflow thread might help you.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        E 1 Reply Last reply
        0
        • SGaistS SGaist

          @EL-jos said in connection with google on Qt:

          qt.networkauth.oauth2: Unexpected call

          This stack overflow thread might help you.

          E Offline
          E Offline
          EL-jos
          wrote on last edited by
          #6

          @SGaist Hi,
          I'm sorry but I followed the instructions in this link to the letter but still the same problem?

          When copying my code to your site, do you have the same problem?

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #7

            If you provide a minimal compilable example, it will be easier to test.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            E 2 Replies Last reply
            0
            • SGaistS SGaist

              If you provide a minimal compilable example, it will be easier to test.

              E Offline
              E Offline
              EL-jos
              wrote on last edited by
              #8

              @SGaist the code I posted is my only code, just a small button in a widget (I do it with QtDesign), but the rest of the code is my source code, you can copy/paste it to test

              1 Reply Last reply
              0
              • SGaistS SGaist

                If you provide a minimal compilable example, it will be easier to test.

                E Offline
                E Offline
                EL-jos
                wrote on last edited by
                #9

                @SGaist up please

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  Your code as is not reusable as you are loading a json file from your hard drive that contains some secrets and some standard information (by the way the toNativeSeparators call is unnecessary as Qt supports forward slashes on all platform and will do the transformation when/if needed).

                  It's also not including the designer .ui file.

                  Hence a minimal compilable example is something that can be directly built minus the secrets information like client_id and other token that shall be changed by the person testing your code. You can put a placeholder text where these secret values shall be changed.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  E 1 Reply Last reply
                  1
                  • SGaistS SGaist

                    Your code as is not reusable as you are loading a json file from your hard drive that contains some secrets and some standard information (by the way the toNativeSeparators call is unnecessary as Qt supports forward slashes on all platform and will do the transformation when/if needed).

                    It's also not including the designer .ui file.

                    Hence a minimal compilable example is something that can be directly built minus the secrets information like client_id and other token that shall be changed by the person testing your code. You can put a placeholder text where these secret values shall be changed.

                    E Offline
                    E Offline
                    EL-jos
                    wrote on last edited by SGaist
                    #11

                    @SGaist here is the content of my json file

                    {"web":{"client_id":"<snip>","project_id":"qt-connexion","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"<snip>","redirect_uris":["http://localhost:5476/"],"javascript_origins":["http://localhost","http://localhost:5476"]}}
                    
                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      Did you saw this updated version of the example code you likely used for your application:

                      https://appfluence.com/productivity/how-to-authenticate-qt-google-sso/

                      ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      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