fix(auth): clear stale credential error after github re-auth

The 401 flag and cached repo list were module-level and only reset
after a 20-min stale window, so re-authenticating left the
"credentials are invalid or expired" message pinned on. Watch the
access token: reset state and refetch on change. Also await
saveCredentials before redirecting so refs are settled.
This commit is contained in:
Julien Calixte
2026-05-14 13:04:44 +02:00
parent f2f2a3114b
commit 816c3687d8
2 changed files with 64 additions and 51 deletions

View File

@@ -19,8 +19,7 @@ onBeforeMount(async () => {
if ("error" in token) {
hasError.value = true
} else {
token.access_token
saveCredentials(token)
await saveCredentials(token)
}
router.replace({ name: "Home" })