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

Change input() calls to async input for compatibility in asynchronous workflows #220

Open
kevinkaburu opened this issue Sep 19, 2024 · 1 comment

Comments

@kevinkaburu
Copy link

There are two instances where input() is used for user interaction (specifically in the LoginTwoFactorAuthChallenge and LoginAcid subtasks). These calls are synchronous, which causes issues when trying to use the library in an asynchronous environment.

Since the library is largely asynchronous, blocking input operations (like input()) break the flow when using it in modern async workflows. It would be beneficial to update these input() calls to non-blocking async input() calls or use another async-friendly input handling mechanism.

Affected Areas:

  • LoginTwoFactorAuthChallenge subtask: Uses input() to request a TOTP or 2FA code from the user.
  • LoginAcid subtask: Uses input() to request further authentication (e.g., via email or phone).

Suggested Solution:

  • Replace the synchronous input() calls with an asynchronous input mechanism.
  • Use asyncio or an async-compatible function to collect user input without blocking the event loop.
@ugsystem
Copy link

pls fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants