-
Notifications
You must be signed in to change notification settings - Fork 500
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
Add sunset banners guiding users to install Element X when registering against a server with MAS. #7890
Conversation
…g against a server with MAS.
.../Modules/Authentication/Registration/Coordinator/AuthenticationRegistrationCoordinator.swift
Show resolved
Hide resolved
@@ -148,8 +148,13 @@ class AuthenticationService: NSObject { | |||
self.registrationWizard = registrationWizard | |||
} catch { | |||
guard homeserver.preferredLoginMode.hasSSO, error as? RegistrationError == .registrationDisabled else { | |||
throw error | |||
if homeserver.preferredLoginMode.providesDelegatedOIDCCompatibility { | |||
throw RegistrationError.delegatedOIDCRequiresReplacementApp |
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 mixed about this now I have implemented it. Maybe this shouldn't throw an error at all, instead letting the 2 screens read that providesDelegatedOIDCCompatibility
property from the homeserver to show the banners. WDYT?
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.
It probably would've been nice but the current solution isn't that bad either so probably not worth the trouble to change it.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #7890 +/- ##
===========================================
+ Coverage 15.08% 15.12% +0.04%
===========================================
Files 1810 1812 +2
Lines 173591 173859 +268
Branches 67305 67389 +84
===========================================
+ Hits 26185 26298 +113
- Misses 147370 147523 +153
- Partials 36 38 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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 stuff, lgtm 👍
...Modules/Authentication/Registration/Test/Unit/AuthenticationRegistrationViewModelTests.swift
Show resolved
Hide resolved
@@ -148,8 +148,13 @@ class AuthenticationService: NSObject { | |||
self.registrationWizard = registrationWizard | |||
} catch { | |||
guard homeserver.preferredLoginMode.hasSSO, error as? RegistrationError == .registrationDisabled else { | |||
throw error | |||
if homeserver.preferredLoginMode.providesDelegatedOIDCCompatibility { | |||
throw RegistrationError.delegatedOIDCRequiresReplacementApp |
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.
It probably would've been nice but the current solution isn't that bad either so probably not worth the trouble to change it.
Quality Gate passedIssues Measures |
This PR makes the following changes:
Closes #7889.
Selecting a server that requires MAS
ScreenRecording_01-09-2025.10-42-52.am_1.MP4
Default server requires MAS
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2025-01-08.at.15.56.30.mp4