web/user: fix deletion of authenticator not refreshing page
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
88cc38394e
commit
d55d44d664
|
@ -30,6 +30,8 @@ export class UserSettingsAuthenticatorDuo extends BaseUserSettings {
|
||||||
// TODO: Handle multiple devices, currently we assume only one TOTP Device
|
// TODO: Handle multiple devices, currently we assume only one TOTP Device
|
||||||
return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsDuoDestroy({
|
return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsDuoDestroy({
|
||||||
id: devices.results[0].pk || 0
|
id: devices.results[0].pk || 0
|
||||||
|
}).then(() => {
|
||||||
|
this.requestUpdate();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}}>
|
}}>
|
||||||
|
|
|
@ -45,6 +45,8 @@ export class UserSettingsAuthenticatorStatic extends BaseUserSettings {
|
||||||
// TODO: Handle multiple devices, currently we assume only one TOTP Device
|
// TODO: Handle multiple devices, currently we assume only one TOTP Device
|
||||||
return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsStaticDestroy({
|
return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsStaticDestroy({
|
||||||
id: devices.results[0].pk || 0
|
id: devices.results[0].pk || 0
|
||||||
|
}).then(() => {
|
||||||
|
this.requestUpdate();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}}>
|
}}>
|
||||||
|
|
|
@ -30,6 +30,8 @@ export class UserSettingsAuthenticatorTOTP extends BaseUserSettings {
|
||||||
// TODO: Handle multiple devices, currently we assume only one TOTP Device
|
// TODO: Handle multiple devices, currently we assume only one TOTP Device
|
||||||
return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsTotpDestroy({
|
return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsTotpDestroy({
|
||||||
id: devices.results[0].pk || 0
|
id: devices.results[0].pk || 0
|
||||||
|
}).then(() => {
|
||||||
|
this.requestUpdate();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}}>
|
}}>
|
||||||
|
|
|
@ -31,6 +31,8 @@ export class UserSettingsAuthenticatorWebAuthn extends BaseUserSettings {
|
||||||
.delete=${() => {
|
.delete=${() => {
|
||||||
return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsWebauthnDestroy({
|
return new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsWebauthnDestroy({
|
||||||
id: device.pk || 0
|
id: device.pk || 0
|
||||||
|
}).then(() => {
|
||||||
|
this.requestUpdate();
|
||||||
});
|
});
|
||||||
}}>
|
}}>
|
||||||
<button slot="trigger" class="pf-c-button pf-m-danger">
|
<button slot="trigger" class="pf-c-button pf-m-danger">
|
||||||
|
|
Reference in a new issue