kylecorbelli / redux-token-auth

Redux actions and reducers to integrate easily with Devise Token Auth
MIT License
154 stars 80 forks source link

Fixes: Access Token in Persistent Storage is removed on hard refresh. #46

Open rg-najera opened 6 years ago

rg-najera commented 6 years ago

As noted in my approach here - https://github.com/kylecorbelli/redux-token-auth/issues/45 this PR makes sure that the auth token keys are not removed from localStorage when they aren't received (i.e. when (i.e. before first use and before they expire)

rg-najera commented 6 years ago

Hey maintainers, just noting that jest fails currently. We dont seem to have TS interface testing. Main point of contention in auth.test.ts is setAuthHeaders(Storage, headers) would need to interface with "Storage" to provide a pass for auth service › setAuthHeaders › sets the appropriate auth headers on the global axios config - Seems like some mock-data for Storage could allow this to pass.