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

Fix JWT OIDC strategy

Jan Sandbrink6d713dfeacf1
diff --git a/lib_static/open_project/authentication/strategies/warden/jwt_oidc.rb b/lib_static/open_project/authentication/strategies/warden/jwt_oidc.rb
index 1088aa1c0c6..35ebbb5a130 100644
--- a/lib_static/open_project/authentication/strategies/warden/jwt_oidc.rb
+++ b/lib_static/open_project/authentication/strategies/warden/jwt_oidc.rb
@@ -30,7 +30,7 @@ module OpenProject
error_description: "Requires scope #{scope} to access this resource."
end
- user = provider.user_auth_provider_links.find_by(external_id: payload["sub"])&.user
+ user = provider.user_auth_provider_links.find_by(external_id: payload["sub"])&.principal
authentication_result(user)
end,
->(error) { fail_with_header!(error: "invalid_token", error_description: error) }