Skip to content

TOTP: After successful set up, JS should check the "Enabled" checkbox for the TOTP provider #556

@r-a-y

Description

@r-a-y

Is your enhancement related to a problem? Please describe.

In two-factor v0.8.0, TOTP was switched over to use the REST API and uses JS to re-render the TOTP options portion of the table on successful TOTP set up. However, after successful TOTP set up, the TOTP provider's "Enabled" checkbox is not checked. This is a usability issue.

Proposed Solution

After successful TOTP set up, the JS should check the "Enabled" checkbox for the TOTP provider in this block:

} ).then( function( response ) {
$( '#two-factor-totp-options' ).html( response.html );
} );
.

Also, I would also like to see a custom jQuery trigger() call so 3rd-party developers can do something after successful TOTP set up or if there is an error with TOTP set up.

Designs

No response

Describe alternatives you've considered

Currently, I'm hooking into jQuery's ajaxComplete event handler to do what I want to do. See r-a-y/bp-two-factor@e7f0da9 .

Please confirm that you have searched existing issues in this repository.

Yes

Metadata

Metadata

Assignees

Labels

TOTPTime-based One-time Passwords

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions