Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Germey committed Dec 17, 2023
1 parent 1361ce4 commit baddda3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/auth/Callback.vue
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit baddda3

Please sign in to comment.