You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
memos/web
Steven 9ecd7b876b fix(web): fix spurious logout on page reload with expired access token
Two bugs caused users to be redirected to /auth too frequently:

1. Race condition in Promise.all([initInstance(), initAuth()]):
   initInstance() makes a gRPC request whose auth interceptor calls
   getAccessToken() synchronously. When the access token was expired,
   getAccessToken() eagerly deleted it from localStorage as a "cleanup"
   side-effect. By the time initAuth() ran and checked hasStoredToken(),
   localStorage was already empty, so it skipped the getCurrentUser()
   call and the token refresh cycle entirely — logging the user out even
   when the refresh-token cookie was still valid. Fix: remove the
   localStorage deletion from getAccessToken(); clearAccessToken()
   (called on confirmed auth failure and logout) handles proper cleanup.

2. React Query retry: 1 caused a second refresh+redirect attempt after
   auth failures. The auth interceptor already handles token refresh and
   request retry internally. If it still throws Unauthenticated, the
   redirect is already in flight — a React Query retry only fires another
   failed refresh and a redundant redirectOnAuthFailure() call. Fix: use
   a shouldRetry function that skips retries for Unauthenticated errors
   while keeping the existing once-retry behaviour for other errors.
3 months ago
..
docs refactor(react-query): optimize config, add error boundary, and remove JSDoc 5 months ago
public chore: enhance site.webmanifest in firefox (#4828) 11 months ago
src fix(web): fix spurious logout on page reload with expired access token 3 months ago
.gitignore
biome.json refactor: remove MemoContentContext and integrate MemoViewContext 5 months ago
components.json feat: themes (#4824) 11 months ago
index.html chore: prevent sensitive data caching 5 months ago
package.json fix: KaTeX math rendering with underscores (#5438) 5 months ago
pnpm-lock.yaml fix: KaTeX math rendering with underscores (#5438) 5 months ago
tsconfig.json chore: clean up unused imports and parameters across components 5 months ago
vite.config.mts refactor(web): improve MemoContent security and maintainability 6 months ago