Skip to content

Commit

Permalink
Fix custom attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
nbulaj committed Mar 26, 2024
1 parent f86e68d commit ef673f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doorkeeper
3 changes: 3 additions & 0 deletions lib/doorkeeper-mongodb/mixins/mongoid/access_token_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ def find_or_create_for(*args)
expires_in = attributes[:expires_in]
use_refresh_token = attributes[:use_refresh_token]

token_attributes = attributes.except(:application, :resource_owner, :scopes, :expires_in, :use_refresh_token)

if Doorkeeper.configuration.reuse_access_token
access_token = matching_token_for(application, resource_owner, scopes)

Expand All @@ -224,6 +226,7 @@ def find_or_create_for(*args)
scopes: scopes,
expires_in: expires_in,
use_refresh_token: use_refresh_token,
**token_attributes,
)
end

Expand Down

0 comments on commit ef673f4

Please sign in to comment.