tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

CheckAuthenticationEmailCode function strange behavior #2302

Closed Mike497 closed 1 year ago

Mike497 commented 1 year ago

Hi! I've noticed some strange behavior when authorizing few clients via email.

  1. Client enters his email to authorize.
  2. Code arrives to this email. Application checks it successfully.
  3. According to application logs right after the call to check email code, AuthorizationStateWaitCode event comes to wait and verify authorization code.
  4. And there is no code sent to the client's official Telegram application.

This behavior is not expected? Why could tdlib ask to wait for app code besides email code in this case?

levlam commented 1 year ago

authorizationStateWaitCode is expected after authorizationStateWaitEmailCode. It is up to the server to decide, how to verify the user with how many checks, and how to send the authentication codes. You can share TDLib logs with https://t.me/tdlib_bot to double-check that this isn't a TDLib issue.