// TODO: If the usernameOrEmail and password was informed by the user on the previous screen, then we should pass only the pin, like this: fun authenticate(pin: EditText)
funauthenticate(
usernameOrEmail:String,
password:String,
twoFactorAuthenticationCode:String
){
valserver=serverInteractor.get()
when{
server==null->{
navigator.toServerScreen()
}
twoFactorAuthenticationCode.isBlank()->{
view.alertBlankTwoFactorAuthenticationCode()
}
else->{
launchUI(strategy){
valclient=factory.create(server)
valclient=factory.create(currentServer)
view.showLoading()
try{
// The token is saved via the client TokenProvider
...
...
@@ -69,7 +59,7 @@ class TwoFAPresenter @Inject constructor(