-
Notifications
You must be signed in to change notification settings - Fork 226
OIDC configuration #4623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OIDC configuration #4623
Conversation
… and add some comments.
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4623 +/- ##
===========================================
- Coverage 80.01% 80.00% -0.01%
===========================================
Files 2103 2104 +1
Lines 55758 55774 +16
Branches 6941 6948 +7
===========================================
+ Hits 44612 44621 +9
- Misses 8752 8757 +5
- Partials 2394 2396 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
// Some homeservers/auth issuers don't support dynamic client registration, and have to be registered manually | ||
val STATIC_REGISTRATIONS = mapOf( | ||
"https://id.thirdroom.io/realms/thirdroom" to "elementx", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pixlwave this map is not "externally" configurable, do you know if we should do something about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine for now. IIRC we added the static registrations specifically for compatibility with Third Room, but given basically everyone will be using MAS, dynamic registration will be supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
is OidcException -> when (this) { | ||
is OidcException.Generic -> AuthenticationException.Oidc(message) | ||
is OidcException.CallbackUrlInvalid -> AuthenticationException.Oidc(message) | ||
is OidcException.Cancelled -> AuthenticationException.Oidc(message) | ||
is OidcException.MetadataInvalid -> AuthenticationException.Oidc(message) | ||
is OidcException.NotSupported -> AuthenticationException.Oidc(message) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're mapping them to the same type, are we sure the messages are clear enough to track the root cause of the issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, for what I have seen, it seems to be clear enough. We may want to improve the mapping if it's not the case.
Previously the homeserver reachability was designed as the cause of the failure, so I guess this is already much better.
I am not possible to login to my matrix-authentification-service. |
Content
Let OIDC configuration be read from BuildConfig file.
Also improve the error dialog when there is an error in the configuration (see screenshot below). Since this is generally build issue, there is no need to translate such error message.
Motivation and context
Make Oidc configuration configurable at build time.
Screenshots / GIFs
Tests
Tested devices
Checklist