All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fixed
DoubleRenderError
when inputting an invalid user code (#12).
- Add compatibility with Doorkeeper 5.6.5 (#10).
- Install and enable new development dependency: rubocop-performance.
- Update development dependencies.
- Update RuboCop configuration, including new preferences, and refactor the code to solve the new offenses.
- Opt-in for rubygems MFA requirement.
- Replace Travis CI with a GitHub Actions CI Workflow.
- Test against additional Ruby and Rails versions.
- Added compatibility with Doorkeeper's
hash_token_secrets
config option.
- Register this Doorkeeper extension as
device_code
custom OAuth Grant Flow.
-
Upgrade
doorkeeper
dependency, matching versions~> 5.5
. -
Use the standard IANA URN value
urn:ietf:params:oauth:grant-type:device_code
as grant type for device access token requests. It replaces the previous valuedevice_code
, which was deliberately nonstandard to make it work with Doorkeeper versions prior to5.5
.This change requires you to update the
grant_type
parameter of the device access token requests from your clients, setting it to the aforementioned standard IANA URN value. More details about this request are available under the sectionDevice Access Token Request / polling
from the README (link).Depending on your installed version of Doorkeeper (in the range
~> 5.5
), the olddevice_code
grant type value might still work out of the box, thanks to a fallback strategy provided by Doorkeeper gem itself. At the time of writing, using Doorkeeper5.5.0
and5.5.1
, the old grant type still works, but a warning message is printed at each request, announcing that this fallback strategy will be removed in newer versions of Doorkeeper.If you want to adequately support the old
device_code
grant type from your backend, you can simply register an additional Doorkeeper Grant Flow and enable it in Doorkeeper configuration. For the Grant Flow registration you can use theDoorkeeper::Request::DeviceCode
strategy class as provided by this gem.For example, you can add the following code to an appropriate place, such as an initializer file:
Doorkeeper::GrantFlow.register( :legacy_device_code, grant_type_matches: 'device_code', grant_type_strategy: Doorkeeper::Request::DeviceCode )
Then, you can enable this grant flow in Doorkeeper configuration, either in addition to or in place of the default grant flow, according to your needs:
Doorkeeper.configure do # ... grant_flows [ 'legacy_device_code', 'device_code', # also enable the default/standard flow, if you want # ... ] # ... end
-
Update generated files according to the boilerplate from rails
6.1.3.1
. -
Upgrade development dependencies.
- Dropped support for Rails
5.0
and5.1
.
- Scopes handling. The scope passed from client requests was ignored, and the
resulting access token scope was always the default one. This has been fixed,
and Doorkeeper's
enforce_configured_scopes
setting is also honored (refer to https://doorkeeper.gitbook.io/guides/ruby-on-rails/scopes).
- Add "Example Application" section to the README.
- Install
rubocop-rails
development dependency. - Add Rails version
6.1
to Travis CI testing matrix. - Add Ruby version
3.0
to Travis CI testing matrix, running only together with Rails version>= 6.0
.
- [#2] Extract
DeviceGrant
implementation into new moduleDeviceGrantMixin
. - Upgrade development dependencies.
- Upgrade RuboCop as well, keep its config file up to date, and refactor the code solving new offenses.
- Add missing required Ruby version Gem Specification attribute.
- Change RuboCop target Ruby version according to the Gem Specification (see above).
- First release!