This commit is contained in:
AceDataCloud committed 2023-12-18 02:39:36 +08:00
1 parent ded672001b
commit c21a320d10
1 file changed
+3 -3
+3 -3
View File
@@ -1,7 +1,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { getCookie } from 'typescript-cookie';
import { getAuthBaseUrl, getChatBaseUrl } from '@/utils';
import { getAuthBaseUrl, getHubBaseUrl } from '@/utils';
import { removeCookies } from '@/utils/cookie';
interface IData {
@@ -37,10 +37,10 @@ export default defineComponent({
}
} else {
console.debug('access token and refresh token not found, try to re-auth again');
const chatBaseUrl = getChatBaseUrl();
const hubBaseUrl = getHubBaseUrl();
const authBaseUrl = getAuthBaseUrl();
// callback url used to init access token and then redirect back of `redirect`
const callbackUrl = `${chatBaseUrl}/auth/callback?redirect=${this.redirect}`;
const callbackUrl = `${hubBaseUrl}/auth/callback?redirect=${this.redirect}`;
// redirect to auth service to get access token then redirect back
const targetUrl = `${authBaseUrl}/auth/login?redirect=${callbackUrl}`;
window.location.href = targetUrl;