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

feat: added totp login #228

Merged
merged 3 commits into from
Jan 19, 2024
Merged

Conversation

siddhart1o1
Copy link
Member

@siddhart1o1 siddhart1o1 commented Jan 19, 2024

Usage:
If TOTP is required but not provided, the user will be prompted to input it. If the entered code is incorrect, it will repeatedly ask for the correct code (loop).
If TOTP is required and the user has already passed the login code via --two-fa-code, this code will be used. If this code is incorrect, it will again prompt for the correct code (loop input).

Comment on lines +31 to +33
std::io::stdin()
.read_line(&mut input)
.expect("Failed to read line");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the guarantees that this operation can never fail ?

@sandipndev
Copy link
Member

Was wondering if we can e2e test this out.

@siddhart1o1
Copy link
Member Author

Was wondering if we can e2e test this out.

yup, but this require lib so that we can generate totp code. will look how we can do It.

@siddhart1o1 siddhart1o1 merged commit 5911f4d into login-using-email Jan 19, 2024
@siddhart1o1 siddhart1o1 deleted the feat--added-totp-login branch January 19, 2024 08:58
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

Successfully merging this pull request may close these issues.

4 participants