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

[totp] Add TOTP Code check in Login #1212

Merged
merged 22 commits into from Dec 2, 2020
Merged

Conversation

alexlyp
Copy link
Member

@alexlyp alexlyp commented Jun 8, 2020

Requires #1210

This PR adds the ability to have users Login with TOTP if they have verified a TOTP Secret.

Currently, if a user has verified a TOTP then they will be told they need a code to be entered along with their username/password. This code must match before the hashed password is compare against what is saved in the database.

According to the implemented security measures here, we will only allow 2 failed TOTP codes to be submitted for a givien epoch. Any subsequent request will fail with a ErrorStatusTOTPWaitForNewCode

@alexlyp alexlyp changed the title [cms] Add TOTP Code check in Login [totp] Add TOTP Code check in Login Jun 15, 2020
politeiawww/api/www/v1/v1.go Outdated Show resolved Hide resolved
politeiawww/totp.go Outdated Show resolved Hide resolved
politeiawww/user.go Outdated Show resolved Hide resolved
politeiawww/cmd/shared/login.go Show resolved Hide resolved
politeiawww/user.go Outdated Show resolved Hide resolved
@alexlyp alexlyp requested a review from lukebp September 21, 2020 15:48
politeiawww/api/www/v1/v1.go Show resolved Hide resolved
politeiawww/totp.go Outdated Show resolved Hide resolved
politeiawww/user.go Outdated Show resolved Hide resolved
politeiawww/user.go Outdated Show resolved Hide resolved
politeiawww/user.go Show resolved Hide resolved
politeiawww/user.go Outdated Show resolved Hide resolved
@alexlyp
Copy link
Member Author

alexlyp commented Nov 25, 2020

OK updated with your suggestions @lukebp

Copy link
Member

@lukebp lukebp left a comment

Choose a reason for hiding this comment

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

ACK

@marcopeereboom will want to ok this.

@alexlyp alexlyp merged commit 00d32de into decred:master Dec 2, 2020
@alexlyp alexlyp deleted the ayp_totp_login branch December 2, 2020 16:08
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.

None yet

4 participants