From d55d44d66452a684d4363982152cde6b4b6093f7 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 6 Jun 2021 19:09:29 +0200 Subject: [PATCH] web/user: fix deletion of authenticator not refreshing page Signed-off-by: Jens Langhammer --- .../user-settings/settings/UserSettingsAuthenticatorDuo.ts | 2 ++ .../user-settings/settings/UserSettingsAuthenticatorStatic.ts | 2 ++ .../user-settings/settings/UserSettingsAuthenticatorTOTP.ts | 2 ++ .../user-settings/settings/UserSettingsAuthenticatorWebAuthn.ts | 2 ++ 4 files changed, 8 insertions(+) diff --git a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorDuo.ts b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorDuo.ts index 8c5b93c02..9bfc97c95 100644 --- a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorDuo.ts +++ b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorDuo.ts @@ -30,6 +30,8 @@ export class UserSettingsAuthenticatorDuo extends BaseUserSettings { // TODO: Handle multiple devices, currently we assume only one TOTP Device return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsDuoDestroy({ id: devices.results[0].pk || 0 + }).then(() => { + this.requestUpdate(); }); }); }}> diff --git a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorStatic.ts b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorStatic.ts index 44df27c5a..09a8f67cb 100644 --- a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorStatic.ts +++ b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorStatic.ts @@ -45,6 +45,8 @@ export class UserSettingsAuthenticatorStatic extends BaseUserSettings { // TODO: Handle multiple devices, currently we assume only one TOTP Device return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsStaticDestroy({ id: devices.results[0].pk || 0 + }).then(() => { + this.requestUpdate(); }); }); }}> diff --git a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorTOTP.ts b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorTOTP.ts index 82343b16a..0c9fd7986 100644 --- a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorTOTP.ts +++ b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorTOTP.ts @@ -30,6 +30,8 @@ export class UserSettingsAuthenticatorTOTP extends BaseUserSettings { // TODO: Handle multiple devices, currently we assume only one TOTP Device return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsTotpDestroy({ id: devices.results[0].pk || 0 + }).then(() => { + this.requestUpdate(); }); }); }}> diff --git a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorWebAuthn.ts b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorWebAuthn.ts index 2aa19db3b..1772a9112 100644 --- a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorWebAuthn.ts +++ b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorWebAuthn.ts @@ -31,6 +31,8 @@ export class UserSettingsAuthenticatorWebAuthn extends BaseUserSettings { .delete=${() => { return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsWebauthnDestroy({ id: device.pk || 0 + }).then(() => { + this.requestUpdate(); }); }}>