4. 🔐Authentication & User Roles

🔑Token System:

  • The app uses an access token for API authentication.
  • Token expires:
    • After 15 minutes of inactivity
    • After 1 day, regardless of usage
  • On token expiration: API returns “Unauthorized” → user is redirected to onboarding.

🗃️Caching:

  • Stores:
    • Selected theme (dark/light/system)
    • Selected language
    • File/image caches
  • On logout: All caches cleared (except theme/language)