Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add token request parameters for authorization code flow #191

Closed

Conversation

coberlin
Copy link

The access token request needs the code if we're using code flow. Some providers require additional parameters such as grant_type and redirect_uri.

To run tests, pin the minitest version per a conflict with mocha, as noted here: freerange/mocha#614
But do not leave pinned as the gem fails to install under some rubies that previously succeeded.

For example:
net-imap-0.5.0 requires ruby version >= 3.1.0, which is incompatible with the current version, ruby 2.6.8p0 (jruby 9.3.7.0)

Also, Set grant type explicitly when response type is code

Setting the grant_type to :authorization_code in extra_token_params results in token requests with multiple grant types separated by commas, with authorization_code appended to the end, which results in invalid grant type error from the provider.

@coberlin coberlin force-pushed the add-extra-token-request-params branch from c533a1a to 38e5959 Compare October 23, 2024 17:18
@coberlin
Copy link
Author

Update: Changing request to require redirect_uri -- it is required, not optional, per https://docs.duendesoftware.com/identityserver/v7/reference/endpoints/token/

The access token request needs the code if we're using code flow.
For authorization code flow, grant_type and redirect_uri are also required.
See https://docs.duendesoftware.com/identityserver/v7/reference/endpoints/token/

To run tests, pin the minitest version per a conflict with mocha, as noted here:
freerange/mocha#614
But do not leave pinned as the gem fails to install under some rubies that
previously succeeded.

For example:
net-imap-0.5.0 requires ruby version >= 3.1.0, which is incompatible with the
current version, ruby 2.6.8p0 (jruby 9.3.7.0)
@coberlin coberlin force-pushed the add-extra-token-request-params branch from 38e5959 to 42df4f4 Compare October 23, 2024 17:20
@coberlin
Copy link
Author

Update: Changing request to require redirect_uri -- it is required, not optional, per https://docs.duendesoftware.com/identityserver/v7/reference/endpoints/token/

@coberlin coberlin closed this Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant