Fixes for OIDC#2411
Conversation
PR SummaryMedium Risk Overview Loopback host names are hoisted to a shared Reviewed by Cursor Bugbot for commit f34f894. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.
Reviewed by Cursor Bugbot for commit 12f89ab. Configure here.
| ); | ||
| } | ||
| return uri; | ||
| }).toList(); |
There was a problem hiding this comment.
Registration auth redirect mismatch
Medium Severity
registerOidcClient posts loopback native redirect_uris with ports removed, while the documented OIDC flow still uses the original redirectUri (including port) in authorization and token requests. Servers that validate redirect_uri by exact match to registered values may reject login after successful registration.
Reviewed by Cursor Bugbot for commit 12f89ab. Configure here.
There was a problem hiding this comment.
This is intended. At registration, no port is specified, and at authorization all ports MUST be accepted
Port is only specified at authorization Signed-off-by: Yussur Mustafa Oraji <N00byKing@hotmail.de>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2411 +/- ##
==========================================
+ Coverage 59.62% 59.64% +0.02%
==========================================
Files 161 161
Lines 20329 20342 +13
==========================================
+ Hits 12121 12134 +13
Misses 8208 8208
Continue to review full report in Codecov by Harness.
|
| host: uri.host, | ||
| path: uri.path, | ||
| query: uri.hasQuery ? uri.query : null, | ||
| fragment: uri.hasFragment ? uri.fragment : null, |
There was a problem hiding this comment.
So this is just removing the port from the redirectUrl, but is this then still working on for example Linux Desktop? There the port is used to find the application iirc
There was a problem hiding this comment.
I was testing on desktop, so yes :P
The port is still forwarded, but not at registration.
Its still present in the authorization


These changes allow connection to the newly added OIDC support in Continuwuity.
I tested the change by building FluffyChat, which worked (After setting the oidc flag).
Currently, login fails because:
OIDC-only logins make the sdk throw an exceptionFirst patch modifies the logic so that the exception only occurs if both legacy and oidc login are unavailableContinuwuity returns code 200 on successful registration, but 201 is expected by the sdkContinuwuity is not standard-conformant here and 201 is correct. I've submitted a patch there to fix the return code.Since this is not really an error, for stability I modified the logic to allow 200 as wellThe third patch may or may not be correct here, I'm really not sure. Let me know what you think.
NOTE: I've never written dart code, extra scrutiny is appreciated
EDIT: Patch 1 and 2 superseded by #2412