Skip to content

Resolve Google/GitHub OAuth sign-in redirect issues#59

Merged
aichannode merged 3 commits into
mainfrom
fix/signin-google-auth-and-redirect
Jul 5, 2026
Merged

Resolve Google/GitHub OAuth sign-in redirect issues#59
aichannode merged 3 commits into
mainfrom
fix/signin-google-auth-and-redirect

Conversation

@engdotme

@engdotme engdotme commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Forward the access token as a query param when the OAuth success redirect
    targets the frontend's /api/auth/exchange bridge, since that route can't
    read the httpOnly cookie set on the backend's origin and was silently
    failing to establish a session.
  • Redirect already-authenticated users away from /sign-in to their
    role's home page, instead of leaving them stuck on the form after the
    OAuth callback bounces them back through /api/auth/exchange
    /auth/callback/sign-in.
  • Document the new JWT_ACCESS_SECRET requirement in frontend/.env.example
    and README.md — the callback and middleware.ts verify the access-token
    cookie locally, so a missing/mismatched secret breaks OAuth sign-in
    without any visible error.

Test plan

  • backend: npx jest test/unit/modules/auth/auth.controller.spec.ts
  • Manually sign in with Google/GitHub OAuth end-to-end and confirm you land
    on your role's home page instead of bouncing back to /sign-in
  • Visit /sign-in while already logged in and confirm you're redirected
    home instead of seeing the form

@aichannode aichannode temporarily deployed to fix/signin-google-auth-and-redirect - forgeng-backend PR #59 July 5, 2026 00:29 — with Render Destroyed
@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
forgeng-frontend Ready Ready Preview, Comment Jul 5, 2026 12:29am

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

Backend coverage

Backend coverage

Lines Statements Branches Functions
Coverage: 72%
71.37% (1431/2005) 64.98% (850/1308) 73.64% (271/368)

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

Frontend coverage

Frontend coverage

Lines Statements Branches Functions
Coverage: 31%
31.29% (819/2617) 24.61% (400/1625) 25.56% (192/751)

@engdotme engdotme self-assigned this Jul 5, 2026
@engdotme engdotme requested a review from aichannode July 5, 2026 00:31
@engdotme engdotme marked this pull request as ready for review July 5, 2026 00:31

@aichannode aichannode 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.

LGTM! thank you

@aichannode aichannode merged commit efa6872 into main Jul 5, 2026
4 checks passed
@aichannode aichannode deleted the fix/signin-google-auth-and-redirect branch July 5, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants