connection with google on Qt
-
@EL-jos said in connection with google on Qt:
qt.networkauth.oauth2: Unexpected call
This stack overflow thread might help you.
-
@EL-jos said in connection with google on Qt:
qt.networkauth.oauth2: Unexpected call
This stack overflow thread might help you.
-
If you provide a minimal compilable example, it will be easier to test.
-
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.
-
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.
@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"]}} -
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/
?