Skip to content

Commit

Permalink
fix(webapp): clear session state for re-login after TOTP setup
Browse files Browse the repository at this point in the history
  • Loading branch information
peterthomassen committed Jul 17, 2023
1 parent 20395a4 commit ceb1ed4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion www/webapp/src/views/Console/TOTPVerifyDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
</template>

<script>
import {digestError, HTTP, withWorking} from '@/utils'
import {digestError, HTTP, logout, withWorking} from '@/utils'
import ErrorAlert from "../../components/ErrorAlert";
import QrcodeVue from '../../modules/qrcode.vue/dist/qrcode.vue.esm'
import {mdiCheck, mdiClose, mdiNumeric1Circle, mdiNumeric2Circle} from "@mdi/js";
Expand Down Expand Up @@ -141,6 +141,7 @@ export default {
() => HTTP.post('auth/totp/' + this.data.id + '/verify/', {code: this.code})
);
this.successDetail = res.data.detail;
await logout();
} catch (ex) {
let errors = await digestError(ex);
for (const c in errors) {
Expand Down

0 comments on commit ceb1ed4

Please sign in to comment.