Two Factor local login proposal

Worked this week at getting up to speed with qunit, and moving forward on most of the review items.

Done:

  • Blocking previous codes - valid 2-factor auth tokens can only be authenticated once/30 seconds. :white_check_mark:
    • I played with updating the “last used” any time the token was attempted but that seemed to be overkill, and frustrating as to why a token would fail.
  • Translatable texts. :white_check_mark:
  • Move second factor logic to a helper class. :white_check_mark:
  • Move second factor specific controller endpoints to its own controller. :white_check_mark:
  • Move serialization logic for 2-factor details in admin user views. :white_check_mark:
  • Add a login ember component for de-duplication :white_check_mark:
  • Fix up code formatting :white_check_mark:
  • Change verbiage of google authenticator :white_check_mark:

Todo:

  • js tests
  • controller tests
  • Add modal for explaining what 2fa with links to Google Authenticator/FreeOTP

Questions:

For reviewers, would it be easier to squash my changes in a new commit, or have an incremental “since last review” commit? Regardless, I will finish writing the tests and other todo items, and push it back up soon.

For running qunit tests, is there a way of quickly running a single test? As I’m building out a suite, It would be great to be able to build out expectations without having to re-run all tests each time.

12 Likes