Oauth2 AuthenticationError: Code not received - How to receive auth code by POST method?

Hi all, I am trying to create a simple app that can obtain the access_token using OAuth2.

For this, I have followed the Qt Reddit Example as reddit also uses OAuth2. It ran successfully by showing the live feed. Now I've ported the same code to be used on a different server.

But there's a problem - the server returns the code parameter in POST data instead of GET data (nothing seen in url bar unlike the reddit case). So my Qt app is unable to read the data and is giving the error - qt.networkauth.oauth2: AuthenticationError: Code not received.

I can see the POST data from the Network tab in Firefox. If I manually feed the code from there, the app continues and works successfully. How do I make it read the auth code from a POST response?

Hi, I am using Qt 5.11.0
May I ask what more information do you need about the server?
It is doing everything exactly like reddit's server except for the step the one mentioned above i.e. of returning a POST response instead of a GET/redirection response

Sorry @SGaist, the server is not publicly accessible yet. But I found that microsoft's oauth2 flow includes a parameter response_mode:

response_mode: Specifies the method that should be used to send the resulting token back to your app. Can be query or form_post. query provides the code as a query string parameter on your redirect URI, while form_post executes a POST containing the code to your redirect URI.