Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
The file src/types/auth.types.ts still contains a LegacyUser function/type definition that is no longer used in the codebase.
This creates unnecessary confusion and technical debt in the authentication type system.
✅ What is expected
Completely remove the LegacyUser function/type from auth.types.ts.
Ensure no other modules, services, or tests import or reference LegacyUser.
Keep the file focused only on the types currently in use for authentication (JWT payload, session types, etc.).
🔧 What was modified
Code Cleanup
Deleted LegacyUser function/type from src/types/auth.types.ts.
References
Performed a project-wide search for LegacyUser.
Removed any leftover imports or usage across modules.
Tests
Ensured no tests were referencing LegacyUser.
Ran the full test suite → ✅ all passing.
Documentation
Removed references to LegacyUser in docs or comments.
🎯 Acceptance Criteria
src/types/auth.types.ts contains no LegacyUser function/type.
No other code references LegacyUser.
All tests pass successfully.
Documentation and comments remain aligned with the current type system.
🔄 Rollback Plan
If removal causes issues in unexpected areas, revert to the previous commit and re-evaluate where LegacyUser might still be required.
As a fallback, comment the type instead of deleting it to confirm unused status.
Summary by CodeRabbit