Skip to content

Address code review comments for authentication system#61

Merged
jessiezhou819 merged 2 commits intofeature/login-signup-integrationfrom
copilot/sub-pr-45
Nov 30, 2025
Merged

Address code review comments for authentication system#61
jessiezhou819 merged 2 commits intofeature/login-signup-integrationfrom
copilot/sub-pr-45

Conversation

Copy link

Copilot AI commented Nov 30, 2025

📝 Description

Addresses all code review feedback from the automated review. Key improvements:

Backend (auth.py, supabase.py)

  • Generic error messages to avoid leaking Supabase internals
  • Extracted hash_email() utility for reuse
  • Preserved exception chains with from db_error
  • Fixed misleading docstring re: service role key vs anon key

Frontend

  • API_ENDPOINT extracted to module constant (App.jsx)
  • Consolidated duplicate message listeners (background.js)
  • SUCCESS_MESSAGE_TIMEOUT named constant (LoginPage.jsx)
  • Added aria-live accessibility attributes (confirm-email.html)
  • Added standard background-clip alongside -webkit- prefix

Config

  • Removed HTTPS localhost redirect URL causing cert issues
# Before: Raw error exposed
raise HTTPException(status_code=409, detail=msg)

# After: Generic message, details logged
logger.exception(f"Supabase sign_up failed: {msg}")
raise HTTPException(status_code=409, detail="This email is already registered")

🎯 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)

N/A - No UI changes

🔗 Related Issues

Follow-up to PR #45 code review comments


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: jessiezhou819 <115389470+jessiezhou819@users.noreply.github.com>
Copilot AI changed the title [WIP] Add authentication system using Supabase Auth Address code review comments for authentication system Nov 30, 2025
Copilot AI requested a review from jessiezhou819 November 30, 2025 18:04
@jessiezhou819 jessiezhou819 marked this pull request as ready for review November 30, 2025 18:07
@jessiezhou819 jessiezhou819 merged commit 65b2a87 into feature/login-signup-integration Nov 30, 2025
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.

2 participants