Now 'code' param cannot be get from Oauth Response if it's POST request.
Patch will be applied.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

super_romeo created an issue. See original summary.

fathershawn’s picture

Status: Active » Postponed (maintainer needs more info)

I don't think this proposal matches with the protocol:

After the user returns to the client via the redirect URL, the application will get the authorization code from the URL and use it to request an access token.

Can you provide more background information?

fathershawn’s picture

Category: Feature request » Support request
Status: Postponed (maintainer needs more info) » Closed (works as designed)

Moving this to a support request and closing:

This can be implemented with minimal effort in your own code:

  1. Extend \Drupal\oauth2_client\Controller\OauthResponse and override ::RedirectResponse() with your change.
  2. Define a route for your controller
  3. Override \Drupal\oauth2_client\Plugin\Oauth2Client\Oauth2ClientPluginBase::getRedirectUri in your client plugin to use your route instead of the module's controller route.