mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Add a couple more error messages during authentication. (#2497)
* Add copy for error when signing in with refresh tokens enabled. * Show an error when a server's well-known file is invalid. * Changelog. * Fix wrong alert.
This commit is contained in:
+1
-3
@@ -187,9 +187,7 @@ final class SoftLogoutScreenCoordinator: CoordinatorProtocol {
|
||||
// No need to show an error, the user cancelled authentication.
|
||||
break
|
||||
case .sessionTokenRefreshNotSupported:
|
||||
// We should display a specific error saying that we do not support this kind of login
|
||||
// But the copy is TBD
|
||||
viewModel.displayError(.alert(L10n.errorUnknown))
|
||||
viewModel.displayError(.refreshTokenAlert)
|
||||
default:
|
||||
viewModel.displayError(.alert(L10n.errorUnknown))
|
||||
}
|
||||
|
||||
@@ -101,6 +101,8 @@ enum SoftLogoutScreenViewAction {
|
||||
enum SoftLogoutScreenErrorType: Hashable {
|
||||
/// A specific error message shown in an alert.
|
||||
case alert(String)
|
||||
/// An alert that informs the user that login failed due to a refresh token being returned.
|
||||
case refreshTokenAlert
|
||||
/// An unknown error occurred.
|
||||
case unknown
|
||||
}
|
||||
|
||||
+4
@@ -60,6 +60,10 @@ class SoftLogoutScreenViewModel: SoftLogoutScreenViewModelType, SoftLogoutScreen
|
||||
state.bindings.alertInfo = AlertInfo(id: type,
|
||||
title: L10n.commonError,
|
||||
message: message)
|
||||
case .refreshTokenAlert:
|
||||
state.bindings.alertInfo = AlertInfo(id: type,
|
||||
title: L10n.commonServerNotSupported,
|
||||
message: L10n.screenLoginErrorRefreshTokens)
|
||||
case .unknown:
|
||||
state.bindings.alertInfo = AlertInfo(id: type)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user