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:
parent
91728c0273
commit
1d3a234b05
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue