Skip to content

fix(web): handle fulfilled external login errors - #1526

Open
abhinav7x94 wants to merge 1 commit into
supermemoryai:mainfrom
abhinav7x94:fix/web-handle-external-oauth-errors
Open

fix(web): handle fulfilled external login errors#1526
abhinav7x94 wants to merge 1 commit into
supermemoryai:mainfrom
abhinav7x94:fix/web-handle-external-oauth-errors

Conversation

@abhinav7x94

Copy link
Copy Markdown

Summary

  • centralize Google, GitHub, and AgentID external sign-in handling
  • inspect Better Auth's fulfilled result.error contract instead of relying only on rejected promises
  • recover from provider and transport failures by clearing the loading state and pending-login markers
  • recognize Better Auth's fulfilled status-0 transport errors as network failures
  • preserve provider messages for nonzero HTTP errors and keep successful redirect handoffs loading
  • add mounted regressions and run the web suite in CI

Why

Better Auth 1.3.3 resolves non-2xx provider failures as { data: null, error }. It also converts fetch rejection into a fulfilled status-0 error. The previous catch-only handlers ignored those results, leaving the login page permanently on “Redirecting…” with stale pending-login state.

Validation

  • focused login suite: 8/8
  • full web suite: 59/59
  • combined queued web tests pass in both file orders
  • Next production build
  • changed-file TypeScript checks and existing CI type targets
  • frozen-lock install, Biome, and git diff --check

Landing note

This branch overlaps the web-test CI/dependency harness in #1498 and #1525. After either lands, rebase this PR and drop the duplicate harness hunks while retaining the login source and regression.

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.

2 participants