Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[#66464] Fix oauth_user_token strategy.

Pavel Balashou3c2cfd857ddb
diff --git a/modules/storages/app/common/storages/adapters/authentication_strategies/oauth_user_token.rb b/modules/storages/app/common/storages/adapters/authentication_strategies/oauth_user_token.rb
index eeef435c333..be15d391543 100644
--- a/modules/storages/app/common/storages/adapters/authentication_strategies/oauth_user_token.rb
+++ b/modules/storages/app/common/storages/adapters/authentication_strategies/oauth_user_token.rb
@@ -75,8 +75,8 @@ module Storages
config = storage.oauth_configuration.to_httpx_oauth_config.to_h
refreshed_session = refresh_token(config, options, token).value_or { return Failure(it) }
update_token(token, refreshed_session)
-
- yield refreshed_session
+ options = options.deep_merge(headers: { "Authorization" => "Bearer #{token.access_token}" })
+ yield OpenProject.httpx.with(options)
end
def update_token(token, http_session)