alyssaxuu/screenity · error · Error
Token verify failed (${response.status})
Error message
Token verify failed (${response.status}) What it means
The /auth/verify endpoint returned a non-OK HTTP status, so the stored Screenity token could not be confirmed. Thrown in loginWithWebsite when response.ok is false after calling the verify API with the Bearer token; 401/403 also set isTokenInvalid to trigger re-authentication.
Source
Thrown at src/pages/Background/auth/loginWithWebsite.js:181
cached: true,
instantMode: instantMode || false,
};
}
// fresh marker but missing user payload; force a verify call
await chrome.storage.local.set({ lastAuthCheck: 0 });
}
try {
const response = await fetchWithTimeout(`${API_BASE}/auth/verify`, {
headers: {
Authorization: `Bearer ${screenityToken}`,
},
});
if (!response.ok) {
isTokenInvalid = response.status === 401 || response.status === 403;
throw new Error(`Token verify failed (${response.status})`);
}
const responseData = await response.json();
const { subscribed, subscription, hasSubscribedBefore, ...user } =
responseData;
await chrome.storage.local.set({
screenityUser: user,
lastAuthCheck: now,
isLoggedIn: true,
wasLoggedIn: false,
stayLoggedOut: false,
isSubscribed: subscribed,
proSubscription: subscription,
hasSubscribedBefore: !!hasSubscribedBefore,
pushToTalk: false,
onboarding: false,
showProSplash: false,View on GitHub (pinned to 512606387b)
Solutions
- On 401/403 treat the token as expired/revoked and force the user through re-authentication
- Clear lastAuthCheck and retry once to rule out a stale cache marker
- Log the response body for 5xx and surface a transient-network error with retry
- Verify API_BASE and endpoint reachability from the extension context
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at src/pages/Background/auth/loginWithWebsite.js:181 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of alyssaxuu/screenity@512606387b (2026-09-02).
Data as JSON: /api/errors/381f2ff041def376.
Report an issue: GitHub.