From f1bca543ad75f5da2cfcb8a7c357f3a313078fc2 Mon Sep 17 00:00:00 2001 From: Warren Parad Date: Sat, 23 Mar 2024 18:41:51 +0100 Subject: [PATCH] Fix totp data code name. --- src/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 9a44ba2..c732495 100644 --- a/src/index.js +++ b/src/index.js @@ -174,7 +174,7 @@ class LoginClient { await Promise.resolve(); } - async registerDevice(options = { name: '', type: '', totpData: {} }) { + async registerDevice(options = { name: '', type: '', totp: {} }) { const userIdentity = await this.getUserIdentity(); if (!userIdentity) { const e = Error('User must be logged to configure user profile data.'); @@ -251,7 +251,8 @@ class LoginClient { } else if (options.type === 'TOTP') { request = { name: options.name, - totpData: options.totpData, + code: options.totp.verificationCode, + totpData: options.totp, type: 'TOTP' }; }