Sam04/06/2023, 1:05 AM
? Right now: 1. The user taps log in 2.
gets called for the login request and returns null 3. Login succeeds and the tokens are stored to the underlying mechanism 4. The next request that gets made doesn't include the new access token because
doesn't get called again to see the new tokens 5. The server returns an unnecessary 401 6.
gets called, which checks for
being null and attempts to reload from local storage instead of calling the refresh API 7. The failed API call gets retried, this time with the token included Ideally either
wouldn't be cached or there would be some method to call on the client to say "hey, I just logged in, load tokens again".