TelepathyIM / telepathy-morse

Telegram connection manager for the Telepathy framework
GNU General Public License v2.0
61 stars 10 forks source link

2-step verification support #23

Closed Hexcles closed 8 years ago

Hexcles commented 8 years ago

Currently telepathy-morse does not support 2-step verification (extra password in addition to the normal SMS verification code). It would crash (segment fault) and users will get a text from Telegram saying the app is outdated and does not support 2-step verification.

Kaffeine commented 8 years ago

Thank you for pointing this. I just (literally three days ago) updated backend to layer 29, which is required for two-step verification and now can implement it.

The problem is that protocol documentation is outdated and incomplete, so I have to read a code of one of official "monsters" to figure out how it works. It seems that developers didn't document anything after mid of official client contest.

https://core.telegram.org/api#updates-log

Kaffeine commented 8 years ago

Closed via edb13365063cc94c5e768e490da5313a4d3f6ad4.

Kaffeine commented 8 years ago

There was not so many options on how to implement this. I had to add the second SASL Channel, so you'll just get the second password request; both requests would looks the same.

The first "password request" is the auth (phone) code request. If you'll type invalid code, you'll get SASL Failed for this request. If you sent the correct code and you have two-steps verification enabled, then you'll get the second "password request" with actually password being asked. Telepathy does not support hints or password recovery, so there would be no visual difference between requests.