From 4b8f56739e104d7d99a3d75518d2aa68f50b1adb Mon Sep 17 00:00:00 2001 From: Warren Parad Date: Thu, 14 Dec 2023 14:44:12 +0100 Subject: [PATCH] Add device name in registration. --- src/components/mfaDevices/mfaDevices.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/mfaDevices/mfaDevices.js b/src/components/mfaDevices/mfaDevices.js index 6bccc75..a7bd73f 100644 --- a/src/components/mfaDevices/mfaDevices.js +++ b/src/components/mfaDevices/mfaDevices.js @@ -64,12 +64,13 @@ export default class MfaDevices extends LitElement { } registerDevice() { + const deviceNameElement = this.shadowRoot.getElementById('deviceName'); + const deviceName = deviceNameElement && deviceNameElement.value; + this.state = states.LOADING; this.requestUpdate(); setTimeout(async () => { - const deviceNameElement = this.shadowRoot.getElementById('deviceName'); - const deviceName = deviceNameElement && deviceNameElement.value; logger.log('Registering new device', deviceName); try { const result = await loginClient.registerDevice({ name: deviceName });