Fix authentication activity indicators when the authentication server is being slow

* Fetch the OIDC login URL as part of the Server Confirmation screen.

The loading indicator would show and hide while configuring and then immediately show again while fetching the URL.

* Allow the OIDCAuthenticationPresenter to show its own errors.

We no longer need to present errors in the authentication flow coordinator.
This commit is contained in:
Doug
2025-04-10 16:47:11 +01:00
committed by Doug
parent 1557054753
commit 511c4d7bf7
22 changed files with 223 additions and 113 deletions
@@ -139,7 +139,7 @@ struct LoginScreen_Previews: PreviewProvider, TestablePreview {
.snapshotPreferences(expect: viewModel.context.$viewState.map { state in
state.homeserver.loginMode == .password
})
.previewDisplayName("matrix.org")
.previewDisplayName("Initial State")
NavigationStack {
LoginScreen(context: credentialsViewModel.context)
@@ -155,7 +155,7 @@ struct LoginScreen_Previews: PreviewProvider, TestablePreview {
.previewDisplayName("Unsupported")
}
static func makeViewModel(homeserverAddress: String = "matrix.org", withCredentials: Bool = false) -> LoginScreenViewModel {
static func makeViewModel(homeserverAddress: String = "example.com", withCredentials: Bool = false) -> LoginScreenViewModel {
let authenticationService = AuthenticationService.mock
Task { await authenticationService.configure(for: homeserverAddress, flow: .login) }