diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-05-09 20:29:13 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-05-09 20:29:13 -0300 |
commit | 0149fde4874ea7d05ad970099fb0c91515bd9927 (patch) | |
tree | 7dd90f693c072e03ea98ba914e71126f38e9514b /src | |
parent | 3fb9f748adadbd74fa58a4410ed1082da9424936 (diff) | |
download | api-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.
Diffstat (limited to 'src')
-rw-r--r-- | src/routers/vault/models/vault/identity.js | 4 | ||||
-rw-r--r-- | src/routers/vault/types/Identity.js | 5 |
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; /** |