[% INCLUDE 'header.html', title = loc('Security'), bodyclass = 'fullwidthpage' %] [% IF token_generated %]

[% loc('Your token has been generated') %]

[% loc('Token') %]: [% existing_token | html %]

[% loc('Your account') %]

[% ELSIF toggle_2fa_off %]

[% loc('Two-factor authentication has been deactivated') %]

[% loc('Your account') %]

[% ELSIF stage == 'success' %]

[% loc('Two-factor authentication has been activated') %]

[% loc('Thanks, you have successfully enabled two-factor authentication on your account.') %]

[% loc('Your account') %]

[% ELSIF stage == 'activate' %]

[% loc('Two-factor authentication') %]

[% PROCESS 'auth/2fa/form-add.html' %]
[% ELSE %]

[% loc('Security') %]

[% loc('Two-factor authentication') %]

[% IF c.user.is_superuser || c.user.from_body %] [% IF has_2fa %] [% IF !c.cobrand.call_hook('must_have_2fa', c.user) %] [% END %] [% ELSE %] [% END %] [% END %]

[% loc('Token') %]

[% IF existing_token %]

[% loc('Current token:') %] [% existing_token | html %]

[% END %]

[% IF existing_token %]

[% loc('If you generate a new token the existing token will no longer work.') %]

[% END %]
[% END %] [% INCLUDE 'footer.html' %]