summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-05-09 20:29:13 -0300
committerJesusaves <cpntb1@ymail.com>2021-05-09 20:29:13 -0300
commit0149fde4874ea7d05ad970099fb0c91515bd9927 (patch)
tree7dd90f693c072e03ea98ba914e71126f38e9514b
parent3fb9f748adadbd74fa58a4410ed1082da9424936 (diff)
downloadapi-0149fde4874ea7d05ad970099fb0c91515bd9927.tar.gz
api-0149fde4874ea7d05ad970099fb0c91515bd9927.tar.bz2
api-0149fde4874ea7d05ad970099fb0c91515bd9927.tar.xz
api-0149fde4874ea7d05ad970099fb0c91515bd9927.zip
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.
-rw-r--r--src/routers/vault/models/vault/identity.js4
-rw-r--r--src/routers/vault/types/Identity.js5
2 files changed, 9 insertions, 0 deletions
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;
/**