enable switch to pw totp in account settings

This commit is contained in:
Julian Krauser 2025-05-05 17:44:03 +02:00
parent 63d97d0b83
commit ee52363bde
6 changed files with 429 additions and 56 deletions

View file

@ -102,6 +102,22 @@ export default defineComponent({
resetAllPiniaStores();
this.username = localStorage.getItem("username") ?? "";
this.routine = localStorage.getItem("routine") ?? "";
if (this.username != "") {
this.$http
.post(`/auth/kickof`, {
username: this.username,
})
.then((result) => {
this.usernameStatus = "success";
this.routine = result.data.routine;
localStorage.setItem("routine", result.data.routine);
})
.catch((err) => {
this.usernameStatus = "failed";
this.loginError = err.response?.data;
});
}
},
methods: {
resetRoutine() {