Skip to content

Add Twitter/X and Discord OAuth social connections#388

Open
rasca wants to merge 1 commit intodevfrom
social
Open

Add Twitter/X and Discord OAuth social connections#388
rasca wants to merge 1 commit intodevfrom
social

Conversation

@rasca
Copy link
Contributor

@rasca rasca commented Mar 5, 2026

Summary

  • Introduces a new social_connections Django app with a modular architecture for managing OAuth connections (GitHub, Twitter/X, Discord)
  • Migrates existing GitHub OAuth from the users app into the unified social connections module with encrypted token storage
  • Adds Twitter/X OAuth 2.0 with PKCE support and Discord OAuth with guild membership verification
  • Frontend: new TwitterLink and DiscordLink components with popup-based OAuth flow and BroadcastChannel result communication
  • Profile edit page updated to show all three social connections with link/unlink functionality
  • Includes comprehensive test suite for all OAuth flows, encryption, models, and serializers
  • Legacy GitHub API fields preserved for backward compatibility

Test plan

  • Verify GitHub OAuth still works end-to-end (link, disconnect, check-star)
  • Test Twitter/X OAuth flow: initiate, callback, profile display, disconnect
  • Test Discord OAuth flow: initiate, callback, profile display, disconnect, guild membership check
  • Verify duplicate account linking is rejected (same platform account on different users)
  • Confirm encrypted tokens are stored correctly and decrypted on API calls
  • Run backend tests: python manage.py test social_connections
  • Verify legacy github_username and github_linked_at fields still appear in user API responses

Introduce a unified social_connections Django app that consolidates OAuth
flows for GitHub, Twitter/X, and Discord. Migrates existing GitHub OAuth
from users app into the new modular structure with encrypted token storage,
PKCE support for Twitter, and Discord guild membership checks. Adds
frontend components and callback routes for linking accounts from the
profile edit page.
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