At the mo we have the boilerplate project's getCurrentUser()
method, that synchronously returns the user. If it's not fetched yet, bad luck!
This isn't good. We should handle:
- waiting to confirm if we're logged in or not. (unless we block the rest of app startup till we know, not too much of a UX cost)
- currently this happens at startup
- we could embed this on app startup, as we generate the index.html client-side now, e.g
window.USER = { id: 15, name: "bob... }
- expiration (i.e starting to get 401 Unauthorized responses)