Files
chatwoot/app/javascript/dashboard/routes/auth/Confirmation.vue
Nithin David Thomas 09ce85b30d Chore: moves localstorage helper as a shared utility (#6838)
* Chore: moves localstorage helper as a shared utility and refactors constants

* Refactors constants file

* Fixes merge conflicts

* Delete constants.js

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2023-04-11 15:50:46 +05:30

35 lines
750 B
Vue

<template>
<loading-state :message="$t('CONFIRM_EMAIL')" />
</template>
<script>
import LoadingState from '../../components/widgets/LoadingState';
import Auth from '../../api/auth';
import { DEFAULT_REDIRECT_URL } from 'dashboard/constants/globals';
export default {
components: {
LoadingState,
},
props: {
confirmationToken: {
type: String,
default: '',
},
},
mounted() {
this.confirmToken();
},
methods: {
async confirmToken() {
try {
await Auth.verifyPasswordToken({
confirmationToken: this.confirmationToken,
});
window.location = DEFAULT_REDIRECT_URL;
} catch (error) {
window.location = DEFAULT_REDIRECT_URL;
}
},
},
};
</script>