Merge pull request #378 from anoadragon453/anoa/confusing_2fa
Make 2FA error message clearer
This commit is contained in:
@@ -167,9 +167,13 @@ class AuthAPI(abc.ABC):
|
|||||||
"next": enter_password,
|
"next": enter_password,
|
||||||
"action": "Login (password entry)",
|
"action": "Login (password entry)",
|
||||||
}
|
}
|
||||||
|
message = (
|
||||||
|
"Code accepted, but you have 2-factor "
|
||||||
|
"authentication enabled. Please enter your password."
|
||||||
|
)
|
||||||
return self.get_login_response(
|
return self.get_login_response(
|
||||||
mxid=user.mxid, state="password", status=202,
|
mxid=user.mxid, state="password", status=202, message=message
|
||||||
message="Code accepted, but you have 2-factor authentication is enabled.")
|
)
|
||||||
return None
|
return None
|
||||||
except Exception:
|
except Exception:
|
||||||
self.log.exception("Error sending phone code")
|
self.log.exception("Error sending phone code")
|
||||||
|
|||||||
Reference in New Issue
Block a user