Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

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

balibabu88db5d90d1ea
diff --git a/web/src/hooks/auth-hooks.ts b/web/src/hooks/auth-hooks.ts
index 208e87dea5..7607186521 100644
--- a/web/src/hooks/auth-hooks.ts
+++ b/web/src/hooks/auth-hooks.ts
@@ -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,
diff --git a/web/src/routes.ts b/web/src/routes.ts
index ef256c3cd1..2447e493ad 100644
--- a/web/src/routes.ts
+++ b/web/src/routes.ts
@@ -151,6 +151,7 @@ const routes = [
path: Routes.Root,
layout: false,
component: '@/layouts/next',
+ wrappers: ['@/wrappers/auth'],
routes: [
{
path: Routes.Root,