Conversation
PR Review: Frontend Authentication RefactoringOverviewThis PR represents a substantial refactoring that introduces Firebase-based authentication with OAuth support. The implementation establishes a solid foundation for auth, but there are several security concerns and best practice issues that should be addressed before merging. 🔴 Critical Issues1. Missing Input Validation on OAuth Endpoint
Issue: The endpoint accepts unvalidated Recommendation: Create a Pydantic schema for the OAuth request body. 2. Weak Password Requirements
Issue: 6-character minimum is below NIST recommendations (8-12 characters minimum). Recommendation: Increase to at least 8 characters and consider adding complexity requirements. 3. Potential State Inconsistency in Signup Flow
The signup process is two-phase:
Issue: If step 1 succeeds but step 2 fails, a driver record exists in the database but the user cannot authenticate. This creates orphaned records. Recommendation: Consider wrapping both operations in a transaction-like pattern or implementing cleanup logic for failed signups.
|
JIRA ticket link
Refactor Front End
Implementation description
Steps to test
What should reviewers focus on?
Checklist