Refactors the `AuthProviderComponent` in `useAuth.tsx` to enhance the handling of Supabase authentication state changes. Updates console logs for better debugging, prioritizes setting pending email state before early returns, and refines the logic for `SIGNED_IN`, `INITIAL_SESSION`, and `SIGNED_OUT` events. Also defers Novu updates and profile fetches to prevent blocking the authentication process.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e7030bef-c72b-4948-9378-ee5e345d91ce
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7cdf4e95-3f41-4180-b8e3-8ef56d032c0e/e7030bef-c72b-4948-9378-ee5e345d91ce/zQglahT
- Updated vite from version 5.4.19 to 7.1.9 in package.json for better performance and features.
- Enhanced session verification logic in useAuth hook to check for session.user before setting user state.
Refactors the AuthProvider component in `src/hooks/useAuth.tsx` to properly export the component, addressing Fast Refresh compatibility warnings and improving developer experience.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: fe5b902e-beda-40fc-bf87-a3c4ab300e3a
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replaces `previousEmail` state with a ref (`previousEmailRef`) to accurately track the user's old email address during authentication flow, specifically for handling email change notifications.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a16cce43-1d93-4e5c-a1e6-6ca90e68cc4f
Replit-Commit-Checkpoint-Type: full_checkpoint