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

[WIP] Add dynamic TOTP functionality #36

Merged
merged 2 commits into from
Jan 24, 2023
Merged

[WIP] Add dynamic TOTP functionality #36

merged 2 commits into from
Jan 24, 2023

Conversation

iandunn
Copy link
Member

@iandunn iandunn commented Jan 5, 2023

Fixes #30

This still has some rough edges, but works pretty well. We'll definitely need to iterate on the progress bar design, but I think it'll be helpful to get the functionality merged and then circle back to that.

To test:

  1. disable TOTP via wp-admin/profile.php
  2. visit /users/{username}/edit/account/. the status should show that it's disabled.
  3. click on totp screen and follow process to setup using qr code
  4. repeat steps using text code instead of qr code
  5. repeat steps using keyboard instead of mouse

@iandunn iandunn force-pushed the totp-functionality branch 3 times, most recently from f744a9a to aaf0da4 Compare January 10, 2023 22:07
@iandunn iandunn force-pushed the totp-functionality branch from 44a0f93 to b434f51 Compare January 18, 2023 19:37
@iandunn iandunn mentioned this pull request Jan 18, 2023
@iandunn iandunn force-pushed the totp-functionality branch from 496a88c to 5ac114c Compare January 20, 2023 17:14
@iandunn iandunn marked this pull request as ready for review January 20, 2023 17:18
@iandunn iandunn requested review from dd32 and pkevan January 20, 2023 17:18
@iandunn iandunn force-pushed the totp-functionality branch from 5ac114c to 398304f Compare January 20, 2023 22:56
@pkevan
Copy link
Contributor

pkevan commented Jan 24, 2023

Seems like there is a dependancy on WordPress/two-factor#504 since testing the code as-is via a sandbox produces a fatal error when viewing /users/{username}/edit/account/:

Fatal error: Uncaught Error: Call to undefined method Two_Factor_Totp::generate_qr_code_url()

@iandunn
Copy link
Member Author

iandunn commented Jan 24, 2023

Doh, I thought I'd mentioned that in the issue, but I didn't.

@iandunn
Copy link
Member Author

iandunn commented Jan 24, 2023

I've got #42 ready, and it depends on this being merged, so I'm gonna go ahead and merge it so we can keep moving. If you have any thoughts, though, please add them and we can always iterate. Reading & commenting on the code is more valuable than testing IMO, if you only have time for one of them.

@iandunn iandunn merged commit f2801c8 into trunk Jan 24, 2023
@iandunn iandunn deleted the totp-functionality branch January 24, 2023 17:31
@iandunn iandunn added this to the MVP milestone Feb 22, 2023
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.

UI: TOTP Setup
2 participants