fix: reset checkAuth debounce in linkShareAuth to prevent redirect loop

When a logged-in user opens a public link share, the 1-minute debounce
on checkAuth() caused it to skip re-parsing the new link share JWT.
This left authLinkShare as false, triggering an infinite redirect loop
in the router guard.

Fixes #2546
This commit is contained in:
kolaente 2026-04-08 10:19:25 +02:00 committed by kolaente
parent 91728c0273
commit 1d3a234b05
1 changed files with 3 additions and 0 deletions

View File

@ -283,6 +283,9 @@ export const useAuthStore = defineStore('auth', () => {
password: password,
})
saveToken(response.data.token, false)
// Reset the debounce so checkAuth() actually parses the new link share
// JWT instead of silently returning due to the 1-minute throttle.
lastUserInfoRefresh.value = null
await checkAuth()
return response.data
}