sanjar-notes / gui-apps

Understand and learn all about GUI apps, from theory to implementation
0 stars 0 forks source link

Simple app login flow, works multi-tenant too #42

Open sanjarcode opened 1 year ago

sanjarcode commented 1 year ago

// States (4) // Login <--> Reopen app <--> appInInvalidState? <--> Logout <--> Login

  1. Login - store relevant values.Simple.
  2. Reopen app - reuse stored values. Simple.
  3. Logout - clear memory. Simple.
  4. appInInvalidState. Detect invalid values
    • validate_token
    • check if api_subdomain, domain are invalid or missing.
    • if anything is invalid, clear the storage and go to login screen.

Holds for any spa. The above being multi tenant.