remove cookie
This commit is contained in:
1 parent
3f2243f411
commit
1d523e49b9
1 file changed
+3
-1
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { getCookie } from 'typescript-cookie';
|
||||
import { getCookie, removeCookie } from 'typescript-cookie';
|
||||
import { getAuthBaseUrl, getDataBaseUrl } from '@/utils';
|
||||
|
||||
interface IData {
|
||||
@@ -24,6 +24,8 @@ export default defineComponent({
|
||||
if (this.accessToken && this.refreshToken) {
|
||||
await this.$store.dispatch('setAccessToken', this.accessToken);
|
||||
await this.$store.dispatch('setRefreshToken', this.refreshToken);
|
||||
removeCookie('ACCESS_TOKEN');
|
||||
removeCookie('REFRESH_TOKEN');
|
||||
if (this.redirect) {
|
||||
this.$router.push(this.redirect);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user