mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-01 05:14:25 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user