Skip to content

Conversation

@jessiezhou819
Copy link
Contributor

@jessiezhou819 jessiezhou819 commented Nov 22, 2025

📝 Description

Brief description of what this PR does.

This pull request introduces a complete authentication system using Supabase Auth, integrating both backend and frontend changes. It adds user registration and login endpoints, securely manages user profiles, and provides a user-friendly email confirmation flow. The update also includes necessary configuration, dependency updates, and a frontend confirmation page.

Backend: Authentication System Integration

  • New authentication endpoints and logic:

    • Adds /auth/signup and /auth/login endpoints in auth.py that handle user registration and login via Supabase Auth, including error handling, local profile persistence, and rollback on failure.
    • Introduces corresponding Pydantic models for requests and responses in auth.py.
    • Registers the new authentication router in the main API (routes.py). [1] [2]
  • Supabase integration and configuration:

    • Adds a singleton Supabase client in supabase.py using service role keys for admin operations.
    • Updates config.py to include Supabase and email redirect settings.
  • Dependency updates for authentication:

    • Adds supabase==2.23.0 and its peer dependency websockets, and updates pydantic and psycopg2-binary versions to ensure compatibility.

Frontend: Email Confirmation Flow

  • User-friendly confirmation page:
    • Adds confirm-email.html in the frontend, providing real-time feedback on email confirmation status and guidance for next steps, including extension integration hooks.

🎯 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔨 Refactoring (no functional changes)
  • 🧪 Tests (adding or updating tests)
  • 🔧 Chore (dependency updates, config changes, etc.)

🧪 Testing

  • I have tested this change locally
  • I have added/updated tests for this change
  • All existing tests pass

📋 Checklist

  • My code follows the code style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

📸 Screenshots (if applicable)

Screen.Recording.2025-11-22.at.1.11.02.PM.mov

🔗 Related Issues

Closes #(issue number)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request implements a comprehensive authentication system using Supabase Auth, integrating email-based user registration and login with email confirmation. The implementation spans backend API endpoints, database integration, frontend UI components, and configuration updates.

Key Changes:

  • Backend authentication endpoints (/auth/signup and /auth/login) with Supabase Auth integration, local profile persistence, and rollback mechanisms
  • Frontend email confirmation pages with real-time status feedback and extension integration
  • Configuration updates for Supabase client initialization and email redirect URLs

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 20 comments.

Show a summary per file
File Description
supabase/config.toml Enables email confirmations and adds redirect URLs for the confirmation flow
frontend/src/popup/LoginPage.jsx Adds success message display for signup and auto-switches to login mode after email confirmation
frontend/src/popup/App.jsx Replaces mock authentication with real API calls to backend, handles token storage and refresh
frontend/src/background/background.js Adds message listener for pre-confirmation checks (has duplicate listener issue)
frontend/public/confirm-email/index.html New simplified email confirmation page with status indicators
frontend/public/confirm-email.html New detailed email confirmation page with extension integration and token display
backend/requirements.txt Adds Supabase SDK dependencies and downgrades pydantic version
backend/app/models/auth.py Defines Pydantic models for signup/login requests and responses
backend/app/core/supabase.py Creates singleton Supabase client with service role key
backend/app/core/config.py Adds Supabase configuration settings and email redirect URL
backend/app/api/routes.py Registers authentication router with the API
backend/app/api/endpoints/auth.py Implements signup and login endpoints with error handling, email hashing, and database rollback

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Noname397 Noname397 mentioned this pull request Nov 28, 2025
15 tasks
@ubclaunchpad ubclaunchpad deleted a comment from Copilot AI Nov 29, 2025
@ubclaunchpad ubclaunchpad deleted a comment from Copilot AI Nov 29, 2025
Copy link
Collaborator

@TonyLiu0226 TonyLiu0226 left a comment

Choose a reason for hiding this comment

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

please address remaining copilot comments and then it should be good to merge

@jessiezhou819
Copy link
Contributor Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link

Copilot AI commented Nov 30, 2025

@jessiezhou819 I've opened a new pull request, #61, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits November 30, 2025 17:59
Co-authored-by: jessiezhou819 <115389470+jessiezhou819@users.noreply.github.com>
Address code review comments for authentication system
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 18 comments.

Files not reviewed (1)
  • frontend/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

jessiezhou819 and others added 4 commits November 30, 2025 10:21
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

3 participants