mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 04:59:21 +03:00
Resolve #1501
This commit is contained in:
parent
9ccd616132
commit
58ad745373
2 changed files with 11 additions and 0 deletions
|
|
@ -77,6 +77,16 @@ export class AdminSettingsSecurity extends AbstractViewSettings {
|
|||
});
|
||||
}
|
||||
|
||||
generateTOTP() {
|
||||
let CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567',
|
||||
length = 16,
|
||||
secret = '';
|
||||
while (0 < length--) {
|
||||
secret += CHARS[Math.floor(Math.random() * 32)];
|
||||
}
|
||||
this.adminTOTP(secret);
|
||||
}
|
||||
|
||||
saveAdminUserCommand() {
|
||||
if (!this.adminLogin().trim()) {
|
||||
this.adminLoginError(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue