Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: auto redirect to login page if web app needs login (#21096)

NFish110bb5e5a5e6
diff --git a/web/service/base.ts b/web/service/base.ts
index 5242f15b80a..ba398c07a6d 100644
--- a/web/service/base.ts
+++ b/web/service/base.ts
@@ -408,7 +408,7 @@ export const ssePost = async (
if (data.code === 'web_sso_auth_required') {
removeAccessToken()
- requiredWebSSOLogin(data.message, 401)
+ requiredWebSSOLogin()
}
if (data.code === 'unauthorized') {
@@ -492,7 +492,7 @@ export const request = async<T>(url: string, options = {}, otherOptions?: IOther
}
if (code === 'web_sso_auth_required') {
removeAccessToken()
- requiredWebSSOLogin(message, 401)
+ requiredWebSSOLogin()
return Promise.reject(err)
}
if (code === 'unauthorized_and_force_logout') {