You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: userManagment/static/userManagment/userManagment.js
+42Lines changed: 42 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -180,6 +180,48 @@ app.controller('modifyUser', function ($scope, $http) {
180
180
}
181
181
};
182
182
183
+
$scope.regenerateSecret=function(){
184
+
if(!$scope.accountUsername){
185
+
alert('Please select a user first.');
186
+
return;
187
+
}
188
+
189
+
if(!confirm('Are you sure you want to regenerate the 2FA secret? This will generate a new secret key and you will need to update your authenticator app.')){
Copy file name to clipboardExpand all lines: userManagment/templates/userManagment/modifyUser.html
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -319,6 +319,14 @@ <h3 class="section-title">
319
319
</div>
320
320
<smallclass="text-muted mt-1 d-block">{% trans "Enter this key in your authenticator app if you cannot scan QR codes." %}</small>
321
321
</div>
322
+
323
+
<!-- Regenerate Secret Button -->
324
+
<divclass="mt-3" ng-show="twofa">
325
+
<buttontype="button" class="btn btn-warning" ng-click="regenerateSecret()" title="{% trans 'Generate a new 2FA secret key' %}">
326
+
<iclass="fa fa-refresh"></i> {% trans "Regenerate Secret" %}
327
+
</button>
328
+
<smallclass="text-muted d-block mt-1">{% trans "Warning: This will generate a new secret key. You'll need to update your authenticator app." %}</small>
0 commit comments