enable switch to pw totp in account settings
This commit is contained in:
parent
63d97d0b83
commit
ee52363bde
6 changed files with 429 additions and 56 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue