mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-25 15:34:55 +00:00
* 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>
35 lines
750 B
Vue
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>
|