Expired tokens interfere with retrieving data from endpoints that are not protected
Opened this issue ยท 3 comments
Tevinthuku commented
When a user opens the site again after a day or so and wants to the available properties, they aren't able to do so and the spinner still spins
How can this be reproduced?
- Setup this token in the local-storage section
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6IkFoZWJ3YTEiLCJlbWFpbCI6ImNyeWNldHJ1bHlAZ21haWwuY29tIiwiZXhwIjoxNTUxNzc2Mzk0fQ.PFimaBvSaxR_cKwLmeRMod7LHkhNTcem22IXTrrg7Ko
- Open the properties page
http://localhost:4200/properties
- You will see that the properties are not being loaded and yet the properties endpoint does not require a token.
Identified Gap
- Making sure that the
properties
page returns data even when a token is expired.
Examples
- In the properties page
- Home page when viewing trending properties
- In the product details page
Additional Context
maybe we could consider the approach taken in #36 whereby the token is decoded to see if it is valid or not before appending it to the request headers.
alexxsanya commented
Hi, @Tevinthuku I once raised this issue and I had a sync with @CryceTruly @patrickf949 & @Manorlds-Eaglespark and we added the implementation his PR #36. You may checkout the implementation to confirm the fix.
Victoradukwu commented
This is actually handled in the PR #36. That will fix it when merged.
Tevinthuku commented
Okay @Victoradukwu @alexxsanya , this will close automatically once the PR is merged ๐