Skip to content

feat: require X verification to comment - #161

Merged
snackman merged 6 commits into
masterfrom
x-verify-comments
Oct 8, 2026
Merged

snackman merged 6 commits into
masterfrom
x-verify-comments

Conversation

@snackman

@snackman snackman commented May 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Users must connect their X account via OAuth before posting comments
  • Replaces self-reported X handle with verified OAuth identity
  • CommentSection shows "Connect X to comment" CTA for unverified users
  • Profile settings show verified handle with disconnect option

Database

  • New columns: x_verified, x_oauth_id, x_avatar_url on profiles table
  • Migration: supabase/migrations/20260505_add_x_verification.sql

Prerequisites (manual)

  • Enable Twitter/X OAuth provider in Supabase Dashboard
  • Enable manual_linking in Supabase auth settings
  • Create X Developer App with OAuth 2.0

Test plan

  • Unverified user sees "Connect X to comment" instead of input
  • Clicking connect redirects to X OAuth
  • After auth, profile shows verified handle with green check
  • Verified user can post comments
  • Disconnect removes verification

🤖 Generated with Claude Code

- Add x_verified, x_oauth_id, x_avatar_url columns to profiles
- Create useXVerification hook for OAuth identity linking
- Gate comment input behind X verification with connect CTA
- Replace free-text X handle input with OAuth verify/disconnect UI
- Re-enable CommentSection with verification gate
- Add analytics tracking for X connect/disconnect
@vercel

vercel Bot commented May 5, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
sheeets Ready Ready Preview Oct 8, 2026 4:52am UTC

Request Review

When not logged in, tapping the comment area now shows a "Sign in to comment"
button that opens the auth modal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Always show "Connect X to comment" regardless of auth state
- If not logged in, clicking shows email input → creates account silently
  (no OTP required until next login) → proceeds to X OAuth
- If logged in but X not verified → goes straight to X OAuth
- Removes separate "Sign in" button and AuthModal dependency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@snackman

snackman commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Parking this for later (decided 2026-10-01). Keep as draft; needs an X developer app + client ID/secret before shipping.

snackman and others added 2 commits October 8, 2026 00:00
…merge

- CommentSection.tsx: remove dangling AuthModal/showAuth reference in the
  desktop return path (left behind when the mobile path was unified onto
  an inline email prompt).
- EventCard.tsx: restore the CommentSection import and commentCount prop
  destructuring that master had stripped while this PR was pending,
  which the merge from master otherwise dropped, breaking the build.
- useXVerification.ts: move the early-return state resets inside the
  async checkVerification() function so the effect no longer calls
  setState synchronously in its body (react-hooks/set-state-in-effect).

Fixes the Vercel preview build failure on this PR.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@snackman
snackman marked this pull request as ready for review October 8, 2026 04:50
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@snackman
snackman merged commit 8414ad5 into master Oct 8, 2026
3 checks passed
@snackman
snackman deleted the x-verify-comments branch October 8, 2026 04:52

This branch was successfully deployed

1 active deployment
Preview — d355708d Deployed Oct 8, 2026 by vercel[bot]
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.

1 participant