diff --git a/CHANGELOG.md b/CHANGELOG.md index 302ee5b29..1fd4270a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ User-visible changes worth mentioning. - [#ID] Add your PR description here. - [#1662] Specify uri_redirect validation class explicitly. -- [#1652] Add custom attributes support to token generator +- [#1652] Add custom attributes support to token generator. +- [#1667] Pass `client` instead of `grant.application` to `find_or_create_access_token`. ## 5.6.6 diff --git a/lib/doorkeeper/oauth/authorization_code_request.rb b/lib/doorkeeper/oauth/authorization_code_request.rb index 43ac24508..c27ed69bc 100644 --- a/lib/doorkeeper/oauth/authorization_code_request.rb +++ b/lib/doorkeeper/oauth/authorization_code_request.rb @@ -32,7 +32,7 @@ def before_successful_response grant.revoke find_or_create_access_token( - grant.application, + client, resource_owner, grant.scopes, custom_token_attributes_with_data,