fix: loginout (#5796)

* fix: variables refresh

* fix: workflow start check

* doc

* fix: loginout

* fix: login
This commit is contained in:
Archer
2025-10-21 11:46:53 +08:00
committed by GitHub
parent ca274feb2e
commit b59f2ccf1d
25 changed files with 480 additions and 398 deletions
@@ -0,0 +1,14 @@
import type { NextApiRequest, NextApiResponse } from 'next';
import { NextAPI } from '@/service/middleware/entry';
import { authCert, clearCookie } from '@fastgpt/service/support/permission/auth/common';
import { delUserAllSession } from '@fastgpt/service/support/user/session';
async function handler(req: NextApiRequest, res: NextApiResponse<any>) {
try {
const { userId } = await authCert({ req, authToken: true });
await delUserAllSession(userId);
} catch (error) {}
clearCookie(res);
}
export default NextAPI(handler);
+2 -1
View File
@@ -20,6 +20,7 @@ import {
removeFastGPTSem
} from '@/web/support/marketing/utils';
import { postAcceptInvitationLink } from '@/web/support/user/team/api';
import { retryFn } from '@fastgpt/global/common/system/utils';
let isOauthLogging = false;
@@ -124,7 +125,7 @@ const provider = () => {
isOauthLogging = true;
(async () => {
await clearToken();
await retryFn(async () => clearToken());
router.prefetch('/dashboard/apps');
if (loginStore && loginStore.provider !== 'sso' && state !== loginStore.state) {