From 0149fde4874ea7d05ad970099fb0c91515bd9927 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 9 May 2021 20:29:13 -0300 Subject: Add a TOTP field to store a 16-chars TOTP secret for 2FA applications. It's currently unused. ...Honestly, 2FA+Email would be pointless, so the idea would be 2FA+Password. --- src/routers/vault/models/vault/identity.js | 4 ++++ src/routers/vault/types/Identity.js | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/routers/vault/models/vault/identity.js b/src/routers/vault/models/vault/identity.js index d2b57fa..5162b14 100644 --- a/src/routers/vault/models/vault/identity.js +++ b/src/routers/vault/models/vault/identity.js @@ -16,6 +16,10 @@ module.exports = { type: Sequelize.STRING(320), allowNull: false, }, + totp: { + type: Sequelize.STRING(16), + allowNull: true, + }, addedDate: { type: Sequelize.DATE, allowNull: false, diff --git a/src/routers/vault/types/Identity.js b/src/routers/vault/types/Identity.js index fb5171f..9a83ffe 100644 --- a/src/routers/vault/types/Identity.js +++ b/src/routers/vault/types/Identity.js @@ -22,6 +22,11 @@ class Identity extends Model { * the Vault user id * @type {number} */ + //totp; + /** + * TOTP 16-chars base64 secret + * @type {string} + */ //userId; /** -- cgit v1.2.3-60-g2f50