Skip to content
Commit 8052497b authored by Laurent Montel's avatar Laurent Montel
Browse files

Patch from Christian Dywan

Support TOTP login with 2FA-enabled accounts

Summary:
The docs for the [[ https://rocket.chat/docs/developer-guides/realtime-api/method-calls/login/ | Rocket.Chat realtime API ]] Ruqola is using unfortunately don't include handling of 2FA-enabled accounts. Login actually seems to succeed because only a `403` error code is handled when in fact `totp-required` is returned as a response. It's worth noting codes can apparently be both numeric and strings.
A peek at [[ https://github.com/RocketChat/Rocket.Chat.iOS/blob/ba49216daa50097745f15855238ef8f4d6519bcf/Rocket.Chat/Managers/Model/AuthManager/AuthManagerSocket.swift#L152 | the iOS client ]] revealed how a login message needs to be constructed. Unlike [[ https://rocket.chat/docs/developer-guides/rest-api/authentication/login/#example-call---when-two-factor2fa-authentication-is-enabled | the login method ]] of the REST API endpoint the code isn't just added to the top-level.

On the UI side of things, an additional Code input needs to be shown in the login page.

BUG: 409212

Reviewers: mlaurent

Subscribers: mlaurent

Differential Revision: https://phabricator.kde.org/D22111
parent a3f0e539
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment