Skip to content

fix: add error-state UI with retry button for failed OAuth callback (Closes #493) [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT] - #951

Open
waterWang wants to merge 1 commit into
Grainlify:mainfrom
waterWang:fix/auth-callback-error-state-493
Open

fix: add error-state UI with retry button for failed OAuth callback (Closes #493) [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT]#951
waterWang wants to merge 1 commit into
Grainlify:mainfrom
waterWang:fix/auth-callback-error-state-493

Conversation

@waterWang

Copy link
Copy Markdown
Contributor

Summary

Replaces the passive 3-second auto-redirect with an actionable retry button on the OAuth callback error state, so users can immediately retry sign-in instead of waiting.

Changes

AuthCallbackPage.tsx

  • Replaced the auto-redirect setTimeout with a clickable "Try signing in again" button
  • Removed the "Redirecting to sign in..." text
  • Applies to all three error paths: error param, missing token, and login failure

SignInPage.test.tsx

  • Updated 3 existing tests that relied on vi.advanceTimersByTime(3000) to click the retry button instead
  • Added 5 new tests in a AuthCallbackPage retry button describe block covering error param, network failure, missing token, navigation, and dark theme

Acceptance Criteria

  • A denied-consent or backend-failure callback shows a clear error state with a retry option, not an infinite spinner
  • Navigating back to this page after a completed auth doesn't get stuck
  • The happy-path success flow is unaffected

Closes #493

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add error-state handling for a failed OAuth callback in src/features/auth/pages/AuthCallbackPage.tsx

1 participant