Fix: Try to fix the issue of not being able to log in through Oauth2 #9601 (#9717)

### What problem does this PR solve?

Fix: Try to fix the issue of not being able to log in through Oauth2
#9601

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2025-08-26 14:06:28 +08:00
committed by GitHub
parent 209ef09dc3
commit 88db5d90d1
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
import message from '@/components/ui/message';
import authorizationUtil from '@/utils/authorization-util';
import { message } from 'antd';
import { useEffect, useMemo, useState } from 'react';
import { useNavigate, useSearchParams } from 'umi';
@ -28,7 +28,7 @@ export const useOAuthCallback = () => {
authorizationUtil.setAuthorization(auth);
newQueryParameters.delete('auth');
setSearchParams(newQueryParameters);
navigate('/knowledge');
navigate('/');
}
}, [
error,

View File

@ -151,6 +151,7 @@ const routes = [
path: Routes.Root,
layout: false,
component: '@/layouts/next',
wrappers: ['@/wrappers/auth'],
routes: [
{
path: Routes.Root,