fix: wrong message Unauthorized to connect to Openproject shown with valid SSO connection#1018
Merged
Conversation
saw-jan
reviewed
May 11, 2026
b8f4510 to
7c574a1
Compare
saw-jan
reviewed
May 12, 2026
9276eb7 to
d6f2af2
Compare
d6f2af2 to
e40c145
Compare
saw-jan
reviewed
May 14, 2026
saw-jan
reviewed
May 14, 2026
saw-jan
reviewed
May 14, 2026
e40c145 to
4937ef9
Compare
abd5d37 to
bbed379
Compare
Unauthorized to connect to Openproject
Signed-off-by: Ashim Shrestha <ashimshrestha2384@gmail.com>
Signed-off-by: Ashim Shrestha <ashimshrestha2384@gmail.com>
ac10f26 to
00bef04
Compare
nabim777
reviewed
May 26, 2026
nabim777
reviewed
May 26, 2026
57dce7a to
e98a30d
Compare
PHP Code CoverageCoverage after merging unauthorized-bug into release/2.11 will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
saw-jan
reviewed
May 26, 2026
saw-jan
reviewed
May 26, 2026
saw-jan
reviewed
May 26, 2026
Signed-off-by: Ashim Shrestha <ashimshrestha2384@gmail.com>
e98a30d to
677426b
Compare
Unauthorized to connect to OpenprojectUnauthorized to connect to Openproject shown with valid SSO connection
Unauthorized to connect to Openproject shown with valid SSO connectionUnauthorized to connect to Openproject shown with valid SSO connection
saw-jan
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Problem
On first Nextcloud login,
getOIDCTokenfetches a valid token, savestoken_expires_at, then callsinitUserInfowhich fails with401because the user hasn't SSO'd into OpenProject yet. Sincetoken_expires_atis already saved, all subsequent requests return the cached token and skipgetOIDCTokenentirely, soinitUserInfois never retried until the token naturally expires (~15 min).Fix
initUserInfoout ofgetOIDCToken->getOIDCTokenis now only responsible for fetching and returning the token.initUserInfonow takesaccessTokendirectly and callsrawRequestinstead ofrequest-> breaking the circular dependency completely.getAccessTokencallsinitUserInfoon every request (for OIDC) untiluser_idanduser_nameare saved -> both in the cached token path and the expired token pathRelated Issue or Workpackage
Screenshots (if appropriate):
Types of changes
Checklist:
CHANGELOG.mdfile