mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### 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:
@ -1,5 +1,5 @@
|
|||||||
|
import message from '@/components/ui/message';
|
||||||
import authorizationUtil from '@/utils/authorization-util';
|
import authorizationUtil from '@/utils/authorization-util';
|
||||||
import { message } from 'antd';
|
|
||||||
import { useEffect, useMemo, useState } from 'react';
|
import { useEffect, useMemo, useState } from 'react';
|
||||||
import { useNavigate, useSearchParams } from 'umi';
|
import { useNavigate, useSearchParams } from 'umi';
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ export const useOAuthCallback = () => {
|
|||||||
authorizationUtil.setAuthorization(auth);
|
authorizationUtil.setAuthorization(auth);
|
||||||
newQueryParameters.delete('auth');
|
newQueryParameters.delete('auth');
|
||||||
setSearchParams(newQueryParameters);
|
setSearchParams(newQueryParameters);
|
||||||
navigate('/knowledge');
|
navigate('/');
|
||||||
}
|
}
|
||||||
}, [
|
}, [
|
||||||
error,
|
error,
|
||||||
|
|||||||
@ -151,6 +151,7 @@ const routes = [
|
|||||||
path: Routes.Root,
|
path: Routes.Root,
|
||||||
layout: false,
|
layout: false,
|
||||||
component: '@/layouts/next',
|
component: '@/layouts/next',
|
||||||
|
wrappers: ['@/wrappers/auth'],
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
path: Routes.Root,
|
path: Routes.Root,
|
||||||
|
|||||||
Reference in New Issue
Block a user