How can I trigger an action when the user saves their TFA settings on the front-end?

When settings are successfully saved, the plugin triggers a jQuery event upon the document:

jQuery(document).trigger('tfa_settings_saved', resp);

So, you just need to add some JavaScript to your site (e.g. using one of the popular plugins for doing this, or using your own hand-coding) to hook that event.

For example, to reload the page after the settings are saved:

jQuery(document).on('tfa_settings_saved', function() {

Posted in: Two Factor Authentication