Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to store Telegram account when two-step verification is enabled #134

Open
PromiseFru opened this issue Sep 20, 2024 · 6 comments
Open
Labels
bug Something isn't working enhancement New feature or request

Comments

@PromiseFru
Copy link
Member

The RelaySMS app fails to prompt for the required password when storing a Telegram account with two-step verification enabled. Instead, it repeatedly outputs the following error:

Two-step verification is enabled and a password is required ...

Steps to Reproduce:

  1. Enable two-step verification for your Telegram account.
  2. Attempt to store the account in the RelaySMS app.
  3. Observe that the input field for the password does not appear, and the error message continues to display.

Expected Behavior:

An input field should appear to allow the user to enter their password when two-step verification is enabled on their Telegram account.

@sherlockwisdom
Copy link
Member

@PromiseFru When is this prompt made? Does the gRPC return a method to help know the password is required? If yes please share that thanks

@sherlockwisdom sherlockwisdom added bug Something isn't working enhancement New feature or request labels Sep 20, 2024
@PromiseFru
Copy link
Member Author

@PromiseFru When is this prompt made? Does the gRPC return a method to help know the password is required? If yes please share that thanks

@sherlockwisdom, the prompt occurs at the code exchange level. After exchanging the code for the first time from Telegram, if two-step verification is enabled, the user is prompted for the password they set for two-step verification and the same verification code initially sent.

The publisher provides the password field at the exchange level in the PNBA code function for this purpose. The error message in the return payload contains a message indicating that the password is required, and the success key in the return payload will be False.

https://github.com/smswithoutborders/SMSWithoutBorders-Publisher/blob/main/docs/grpc.md#exchange-pnba-code-and-store-token

@sherlockwisdom
Copy link
Member

@PromiseFru Thanks, does the Telegram API provide any means of knowing if account requires a password?

@PromiseFru
Copy link
Member Author

@PromiseFru Thanks, does the Telegram API provide any means of knowing if account requires a password?

No, the Telegram API does not provide a direct way to determine if an account requires a password for two-step verification. You'll only find out at the code exchange level when the user is prompted for the password if two-step verification is enabled.

@sherlockwisdom
Copy link
Member

sherlockwisdom commented Sep 20, 2024

Relying on failure to determine if password is a hack, we should use a 2 step then to solve it. Please let me know when we have one so the apps start integrating

@PromiseFru
Copy link
Member Author

PromiseFru commented Sep 26, 2024

Relying on failure to determine if password is a hack, we should use a 2 step then to solve it. Please let me know when we have one so the apps start integrating

@sherlockwisdom, the publisher now indicates whether 2-step verification is enabled in the ExchangePNBACodeAndStoreResponse through the two_step_verification_enabled field.

https://github.com/smswithoutborders/SMSWithoutBorders-Publisher/blob/main/docs/grpc.md#response-4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants