fix(webui): prevent unwanted redirects to login on reset-password page (#487)

* fix(webui): allow reset-password route with token when stale auth exists

* fix(webui): prevent 401 redirect to login on reset-password page
This commit is contained in:
Yiling-J
2026-10-21 12:12:25 +08:00
committed by GitHub
parent e05a23bcc2
commit 19eed521ae
4 changed files with 52 additions and 2 deletions
+2
View File
@@ -11,7 +11,9 @@ const customFetch = async (input: RequestInfo | URL, init?: RequestInit) => {
if (
!window.location.pathname.includes('/login') &&
!window.location.pathname.includes('/signup') &&
!window.location.pathname.includes('/reset-password') &&
!window.location.pathname.startsWith('/share/') &&
!url.includes('/api/auth') &&
!url.includes('/api/authn')
) {
useAuthStore.getState().clearAuth()