Chatwoot/app/javascript/dashboard/routes/auth/Confirmation.vue
Sojan Jose 467b45b427
feat: Improved password security policy (#2345)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-06-07 17:26:08 +05:30

34 lines
752 B
Vue

<template>
<loading-state :message="$t('CONFIRM_EMAIL')"></loading-state>
</template>
<script>
import LoadingState from '../../components/widgets/LoadingState';
import Auth from '../../api/auth';
import { DEFAULT_REDIRECT_URL } from '../../constants';
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>