Process Flow - Auth state observer
Start App
Attach Auth State Observer
User Signs In or Out
Observer Detects Change
Run Callback with User Info or Null
Update UI or State Accordingly
Wait for Next Auth Change
The app starts and attaches an observer to watch authentication changes. When a user signs in or out, the observer runs a callback with the current user info or null, allowing the app to update the UI.