From 7aaf2636e2d13f4f947cc6b40d770216758437ae Mon Sep 17 00:00:00 2001 From: Andrew Woodlee Date: Sun, 13 Nov 2022 20:30:33 -0600 Subject: [PATCH] moved only view of OTP backup tokens to otp/new-account --- app/views/admin/otp/index.pug | 28 ++++++++++++++++++++-------- app/views/otp/new-account.pug | 10 ++++++++++ 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/app/views/admin/otp/index.pug b/app/views/admin/otp/index.pug index ba18b58..b34cd4c 100644 --- a/app/views/admin/otp/index.pug +++ b/app/views/admin/otp/index.pug @@ -1,12 +1,24 @@ extends ../layouts/main block content - div(uk-grid) + + div(uk-grid).uk-flex-middle .uk-width-expand - h1 Tokens - .uk-card-body - h3 These tokens should be saved in a safe place so you can get into your account should you lose your 2FA device - each token of tokens - ul.uk-list.uk-list-divider - li - .uk-text-small= token.token + h1.margin-remove Tokens + .uk-width-auto + button( + type="button", + data-user= user, + onclick="return dtp.adminApp.generateOTPTokens(event);", + ).uk-button.dtp-button-danger + +renderButtonIcon('fa-repeat', 'Generate OTP Tokens') + //- regenerate route should set this so tokens can be viewed once. + if otpRegen + section.uk-section.uk-section-default.uk-section-xsmall + .uk-container + h3 You should save these tokens in a safe place. This is the only time you will see them. + p These tokens should be saved in a safe place so you can get into your account should you lose your 2FA device + each token of tokens + ul.uk-list.uk-list-divider + li + .uk-text-small= token.token diff --git a/app/views/otp/new-account.pug b/app/views/otp/new-account.pug index 4f089c4..8acb085 100644 --- a/app/views/otp/new-account.pug +++ b/app/views/otp/new-account.pug @@ -5,6 +5,16 @@ block content .uk-container h1 2FA Setup Successful + section.uk-section.uk-section-default.uk-section-xsmall + .uk-container + h3 You should save these tokens in a safe place. This is the only time you will see them. + p These tokens should be saved in a safe place so you can get into your account should you lose your 2FA device + each token of otpAccount.backupTokens + ul.uk-list.uk-list-divider + li + .uk-text-small= token.token + + section.uk-section.uk-section-default.uk-section-xsmall .uk-container p Your account is now enabled with access to #{site.name} #{otpServiceName}.