From 8832489390b5b5a1df749f42ef19262c566b41b7 Mon Sep 17 00:00:00 2001 From: AceDataCloud Date: Mon, 18 Dec 2023 02:51:45 +0800 Subject: [PATCH] fix --- src/pages/auth/Callback.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/auth/Callback.vue b/src/pages/auth/Callback.vue index 6835c040..1fc211f5 100644 --- a/src/pages/auth/Callback.vue +++ b/src/pages/auth/Callback.vue @@ -25,13 +25,13 @@ export default defineComponent({ this.refreshToken = getCookie('REFRESH_TOKEN'); if (this.accessToken && this.refreshToken) { // store token to global store - this.$store.dispatch('setAccessToken', this.accessToken); - this.$store.dispatch('setRefreshToken', this.refreshToken); + await this.$store.dispatch('setToken', { + refresh: this.refreshToken, + access: this.accessToken + }); console.debug('set token successfully'); removeCookies(); console.debug('remove cookie for tokens successfully'); - // get user info after get access token - this.$store.dispatch('getMe'); if (this.redirect) { this.$router.push(this.redirect); }