mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-26 08:31:08 -05:00
Refactor: Consolidate Sessions into Security Tab
This commit is contained in:
@@ -1,5 +1,31 @@
|
||||
# Account Security Improvements
|
||||
|
||||
## UI Consolidation: Sessions Merged into Security Tab
|
||||
|
||||
**Date**: 2025-01-14
|
||||
|
||||
**Changes**:
|
||||
- Merged `SessionsTab` functionality into `SecurityTab` "Active Sessions & Login History" section
|
||||
- Removed redundant `SessionsTab.tsx` component
|
||||
- Reduced settings navigation from 7 tabs to 6 tabs
|
||||
- Added proper TypeScript types with `DeviceInfo` interface
|
||||
|
||||
**Benefits**:
|
||||
- All security-related features in one location (password, 2FA, social accounts, sessions)
|
||||
- Eliminated 123 lines of duplicate code
|
||||
- Improved UX with logical grouping of authentication and session management
|
||||
- Simplified navigation structure
|
||||
- Better type safety with typed device information
|
||||
|
||||
**Technical Details**:
|
||||
- Session management uses existing `user_sessions` table with proper RLS
|
||||
- Real-time session fetching via Supabase query
|
||||
- Device detection from `device_info` JSONB column
|
||||
- Session revocation with proper error handling and toast notifications
|
||||
- Type-safe interfaces for `DeviceInfo` and `UserSession`
|
||||
|
||||
---
|
||||
|
||||
## Implemented Security Enhancements
|
||||
|
||||
This document outlines all security improvements made to the account settings system.
|
||||
|
||||
Reference in New Issue
Block a user