Skip to content

fix(auth): recover failed Google sign-in initiation - #1978

Closed
groupthinking wants to merge 1 commit into
mainfrom
chore/auth-health-check-9b43574f
Closed

groupthinking wants to merge 1 commit into
mainfrom
chore/auth-health-check-9b43574f

Conversation

@groupthinking

Copy link
Copy Markdown
Owner

Canonical issue

Closes #1977

Outcome

A user can retry Google sign-in after the client initiation rejects or finishes without leaving /login. The UI shows a generic accessible error without exposing OAuth details.

Scope

  • Included:
    • Retry-state recovery and accessible generic error in apps/web/src/app/login/GoogleSignInButton.tsx.
    • Focused JSDOM component regression coverage.
    • Sprint readiness evidence report.
  • Explicitly excluded:
    • OAuth credentials, provider configuration, callback-path policy, session-gate policy, payments, deployments, and authorization controls.

Risk

  • Risk level: high (Class C authentication change under MERGE_POLICY.md).
  • Failure mode: an unexpected non-navigating provider result displays a generic retryable error; OAuth credentials and server-side policy remain unchanged.
  • Rollback: revert commit c145b57f3b28b072daecf5a21420fe7c3ce62c45.

Verification

Current head: c145b57f3b28b072daecf5a21420fe7c3ce62c45.

  • Focused tests: npm test -- src/app/login/GoogleSignInButton.test.tsx src/lib/__tests__/auth-paths.test.ts src/lib/__tests__/auth-config-source.test.ts src/__tests__/proxy-auth-gate.test.ts — 42 tests passed across 4 files.
  • Type check: npm run type-check — passed.
  • Lint: npm run lint — completed with 0 errors and 3 pre-existing unrelated navigation warnings outside this diff.
  • Required CI
  • Review threads resolved

Production evidence

Not applicable. The governing sprint policy prohibits deployment, preview deployment, publication, and merging. This PR remains draft for Class C human review.

Agent handoff

  • One canonical issue is linked.
  • No competing PR implements the same issue.
  • Acceptance criteria are satisfied by focused local evidence.
  • Required checks pass on the current head.
  • Individual human review is required before any merge because this is a Class C authentication change.

@vercel

vercel Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
v0-uvai Canceled Canceled v0 Sep 17, 2026 3:22am UTC

@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: groupthinking/EventRelay/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: b037f7fd-2e07-4cbd-8f08-da45306322b6


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added documentation Improvements or additions to documentation javascript Pull requests that update javascript code tests labels Sep 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA c145b57.
Ensure that dependencies are being submitted on PR branches. Re-running this action after a short time may resolve the issue. See the documentation for more information and troubleshooting advice.

Scanned Files

None

groupthinking added a commit that referenced this pull request Sep 18, 2026
## Canonical issue

Closes #1979

## Outcome

Adds an internal agenda for the UVAI Home-to-Studio demonstration. The
document labels current-main evidence, draft OAuth PR evidence, expected
visible results, and fallbacks without making a production claim.

## Scope

- Included:
- `docs/SPRINT_DEMO_AGENDA.md` with time-boxed owner placeholders, demo
actions, expected results, and fallbacks.
- Evidence links for current-main Home handoff behavior, focused tests,
Notion task scope, and draft PR #1978.
- Explicitly excluded:
- Authentication, billing, deployments, production configuration, and
external publication.
  - Claims that draft PR #1978 is reviewed, merged, or deployed.

## Risk

- Risk level: low (documentation-only).
- Failure mode: inaccurate evidence wording could overstate draft or
local results.
- Rollback: revert commit `ff31e7540745fdba6019521be487612c294fd861`.

## Verification

Current head: `ff31e7540745fdba6019521be487612c294fd861`.

- [x] Focused tests: `npm --workspace=eventrelay-web test --
src/lib/__tests__/studio-handoff.test.ts
src/lib/__tests__/home-sell-surface.test.ts` — 21 tests passed across 2
files.
- [x] Document checks: `git diff --check`, required-reference
assertions, referenced-path existence checks, and one-H1 check — passed.
- [ ] Required CI
- [ ] Review threads resolved

## Production evidence

Not applicable. This documentation-only PR does not create a deployment
or a production claim. Draft PR #1978 remains open and unmerged; its
OAuth evidence is described only as local evidence at its recorded head.

## Agent handoff

- [x] One canonical issue is linked.
- [x] No competing PR implements the same issue.
- [x] Acceptance criteria are satisfied by the agenda content and local
document/test evidence.
- [ ] Required checks pass on the current head.
- [x] No human decision is requested for product, security, irreversible
infrastructure, or production approval.
@groupthinking
groupthinking marked this pull request as ready for review September 18, 2026 20:56
Copilot AI balanced review requested due to automatic review settings September 18, 2026 20:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Pull request overview

Fixes the login UI getting stuck after a failed/non-navigating Google sign-in attempt by restoring a retryable state and showing a generic accessible error.

Changes:

  • Add client-side recovery logic and an accessible generic error message to the Google sign-in button.
  • Add a focused JSDOM regression test to verify retry behavior after a non-redirecting initiation.
  • Add a sprint readiness evidence report documenting local verification.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
docs/reports/sprint-deployment-readiness-9b43574f.md Adds a sprint readiness report and verification evidence relevant to the auth-change scope.
apps/web/src/app/login/GoogleSignInButton.tsx Implements retry-state recovery and generic accessible error rendering for Google sign-in initiation.
apps/web/src/app/login/GoogleSignInButton.test.tsx Adds a regression test covering the “no redirect” recovery path and subsequent retry click.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +20 to +24
await signIn('google', { callbackUrl });
setError('Google sign-in did not start. Please try again.');
} catch {
setError('Google sign-in did not start. Please try again.');
} finally {
Comment on lines +41 to +42
<p className="mt-3 text-sm text-red-300" role="alert">
{error}

| Work item | Status | Evidence | Next action |
|---|---|---|---|
| Google login retry handling | Implemented locally; not committed or submitted | `GoogleSignInButton.tsx` restores an enabled button and renders a generic `role="alert"` message if `signIn('google')` resolves without redirecting or rejects. | Review the scoped diff; commit only after maintaining scope review. A draft PR is the maximum permitted external code action. |
| Blocker or constraint | Impact | Required resolution |
|---|---|---|
| Sprint policy prohibits deployment | No preview, staging, or production deployment may be started in this sprint execution. | Do not deploy under this run. A future authorized release process must make its own deployment decision. |
| No commit or pull request exists | The implementation is local to the dedicated branch and has no review artifact. | Conduct scoped review; if authorized, commit and open only a draft pull request. |
Comment on lines +21 to +23
setError('Google sign-in did not start. Please try again.');
} catch {
setError('Google sign-in did not start. Please try again.');
@kk-agent

Copy link
Copy Markdown
Collaborator

AXIOM keep-moving: closing as duplicate/conflicted GoogleSignInButton retry work. Survivor: #1984 (mergeable). A1 session PASS already on prod; this cluster is initiation retry coverage only.

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

Labels

documentation Improvements or additions to documentation javascript Pull requests that update javascript code tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(auth): recover Google sign-in initiation failures

3 participants