2019-08-14 09:48:44 +00:00
|
|
|
<template>
|
|
|
|
<loading-state :message="$t('CONFIRM_EMAIL')"></loading-state>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
import LoadingState from '../../components/widgets/LoadingState';
|
|
|
|
import Auth from '../../api/auth';
|
2021-05-28 13:51:16 +00:00
|
|
|
import { DEFAULT_REDIRECT_URL } from '../../constants';
|
2019-08-14 09:48:44 +00:00
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
LoadingState,
|
|
|
|
},
|
2021-05-28 13:51:16 +00:00
|
|
|
props: {
|
|
|
|
confirmationToken: {
|
|
|
|
type: String,
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
},
|
2019-08-14 09:48:44 +00:00
|
|
|
mounted() {
|
|
|
|
this.confirmToken();
|
|
|
|
},
|
|
|
|
methods: {
|
2021-05-28 13:51:16 +00:00
|
|
|
async confirmToken() {
|
|
|
|
try {
|
2021-06-07 11:56:08 +00:00
|
|
|
await Auth.verifyPasswordToken({
|
2021-05-28 13:51:16 +00:00
|
|
|
confirmationToken: this.confirmationToken,
|
|
|
|
});
|
2021-06-07 11:56:08 +00:00
|
|
|
window.location = DEFAULT_REDIRECT_URL;
|
2021-05-28 13:51:16 +00:00
|
|
|
} catch (error) {
|
|
|
|
window.location = DEFAULT_REDIRECT_URL;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2019-08-14 09:48:44 +00:00
|
|
|
</script>
|