implemented the google OAuth authentication #307
Conversation
|
@saurabh19304 is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Google OAuth integration approach is correct (GoogleProvider added, env vars, signin route). Two issues:
1. Hardcoded colors in src/app/signin/page.tsx
The signin page uses hardcoded Tailwind colors that break theming:
// ❌ Hardcoded
bg-gradient-to-br from-slate-950 to-slate-900
bg-slate-800/50 backdrop-blur-md
border-slate-700/50
text-slate-400
// ✅ Use CSS vars
bg-[var(--background)]
bg-[var(--card)]
border-[var(--border)]
text-[var(--muted-foreground)]2. Missing rel="noopener noreferrer" on page.tsx GitHub link — the existing link in page.tsx already has it, but double-check yours does too.
Also note the landing page changes in page.tsx have a trailing whitespace issue and a blank line before the closing brace. Minor but worth cleaning up.
|
Google OAuth sign-in page is a nice idea, but there are blockers: 1. Google provider not configured — // In authOptions.providers:
GoogleProvider({
clientId: process.env.GOOGLE_ID!,
clientSecret: process.env.GOOGLE_SECRET!,
})And document the required env vars ( 2. Hardcoded colors in
Fix these and push — the sign-in page concept is solid once the provider is wired up. |
|
Will fix rhe issues and come back to you |
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
The GoogleProvider configuration in auth.ts is correct. Two issues:
1. Rebase required
PR has merge conflicts with main (auth.ts and page.tsx were modified by other merged PRs). Rebase and resolve conflicts before re-review.
2. Hardcoded colors throughout signin/page.tsx
The sign-in page uses entirely hardcoded dark palette:
bg-gradient-to-br from-slate-950 to-slate-900→bg-[var(--background)]bg-slate-800/50,border-slate-700/50→bg-[var(--card)] border-[var(--border)]text-white,text-slate-300,text-slate-400→text-[var(--foreground)],text-[var(--muted-foreground)]- GitHub button:
bg-white text-slate-900 hover:bg-slate-100→bg-[var(--card)] text-[var(--card-foreground)] hover:bg-[var(--control)]
This page would look broken in light mode (dark text on dark background) since the colors are hardcoded for dark theme only.
Also add GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET to .env.example (with placeholder values).
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
1. Google users get 401 everywhere — the signIn callback only upserts to DB for provider === "github". Google users have no DB record and no githubId in their session, so every API route returns 401. The feature is non-functional — users can sign in but cannot use the dashboard at all.
2. Hardcoded colors in signin/page.tsx — bg-gradient-to-br from-slate-950 to-slate-900, text-slate-400, text-white throughout. Use CSS vars.
3. Broken SVG path — the GitHub icon path data has v 3.293c0 (space between v and the value) — invalid path syntax.
4. Missing EOF newlines on page.tsx and auth.ts.
5. No env var docs — add GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET to .env.example.
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Issues found in this PR:
- Missing EOF newline — add a trailing newline to all modified files.
|
This PR has merge conflicts with |
|
This PR has conflicts with the current |
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
This PR has merge conflicts with main. Please rebase onto the latest main branch and resolve conflicts to proceed with merging.
|
This PR has merge conflicts with |
|
Hey @saurabh19304! Saw your work on GSSoC 2026. We are building TermUI, a TypeScript terminal UI framework with React-style hooks and JSX, rendered entirely in the terminal. We have 55 unassigned GSSoC issues open, including new widgets, hooks, and CLI tooling. Your TypeScript background transfers directly. Karanjot, TermUI maintainer |
|
This PR has merge conflicts with |
|
This PR has merge conflicts with the current main branch. Please rebase on the latest main to resolve them — your contribution is labeled for GSSoC scoring. |
|
Thanks for the PR! A few design concerns before we can consider this:
This would be a good candidate to discuss first in a GitHub Discussion or Issue before implementing. |
Summary
Added Google OAuth sign-in support alongside existing GitHub login with a clean dedicated sign-in page.
Closes #122
Type of Change
Changes Made
src/lib/auth.tsto include Google Providersrc/app/page.tsxwith a single "Sign In to Continue" buttonsrc/app/signin/page.tsxwith both GitHub and Google sign-in optionsHow to Test
Checklist
npm run lintpassesReady for review.