-
Notifications
You must be signed in to change notification settings - Fork 369
Improve account provider selection during the login flow #5692
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
Conversation
…eFlow<MatrixHomeServerDetails?>`. The MatrixHomeServerDetails are now return by `setHomeserver`
…y local `fun aMatrixHomeServerDetails()`.
…he appropriate error (parity with iOS)
…ror if they continue
|
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #5692 +/- ##
===========================================
- Coverage 79.65% 79.64% -0.01%
===========================================
Files 2427 2428 +1
Lines 65212 65242 +30
Branches 8318 8328 +10
===========================================
+ Hits 51945 51963 +18
- Misses 10291 10300 +9
- Partials 2976 2979 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| accountProviderDataSource.userSelection(data) | ||
| }.getOrThrow() | ||
| val details = authenticationService.setHomeserver(data.url).getOrThrow() | ||
| if (details.supportsOidcLogin.not() && details.supportsPasswordLogin.not()) { |
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'm not a big fan of not...
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.
You just used it in your comment :).
I have updated the code.
| val details = authenticationService.setHomeserver(data.url).getOrThrow() | ||
| if (details.supportsOidcLogin.not() && details.supportsPasswordLogin.not()) { | ||
| // Unsupported homeserver | ||
| throw ChangeServerError.Error( |
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'd remove this Error which is a bit confusing, and create individual error for all the defined errors + one Unknown case for the default behavior
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 have done that and improve the error mapping.
|



Content
Ensure that the user can always get an explicit error up on what has been entered. Either there is no homeserver at the provided url, either the homeserver does not support login password not Oidc flow.
Motivation and context
Give explicit error to users.
Help #4556 and #5627
Screenshots / GIFs
Tests
https://invalid.comhad to be entered for the candidate to appear.matrix.debian.social.Tested devices
Checklist