lifeomic / app-tools

Common utilities for PHC app development
MIT License
0 stars 0 forks source link

Remove the token from storage on a refresh error #28

Closed xdumaine closed 3 years ago

xdumaine commented 3 years ago

The work I'm doing on invalidating tokens with adminGlobalUserSignOut means we could start getting 401s and needing to refresh a token even when it's not expired. Currently, when that happens, we get into a loop because this code expects to only remove it from storage when it's expired. This fixes that to ensure it's removed immediately on refresh failure instead of yielding the old token from storage.