Skip to content

Commit

Permalink
Merge pull request #1761 from c960657/memoize-authentication-failure
Browse files Browse the repository at this point in the history
Memoize authentication failure
  • Loading branch information
nbulaj authored Jan 23, 2025
2 parents de5fc4f + baf936f commit 884e648
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ User-visible changes worth mentioning.

Add your entry here.
- [#1755] Fix the error message for force_pkce
- [#1761] Memoize authentication failure

## 5.8.1

Expand Down
4 changes: 3 additions & 1 deletion lib/doorkeeper/rails/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def doorkeeper_invalid_token_response?
end

def doorkeeper_token
@doorkeeper_token ||= OAuth::Token.authenticate(
return @doorkeeper_token if defined?(@doorkeeper_token)

@doorkeeper_token = OAuth::Token.authenticate(
request,
*Doorkeeper.config.access_token_methods,
)
Expand Down

0 comments on commit 884e648

Please sign in to comment.