gavinvaske / the_recipe_book

0 stars 0 forks source link

Fix Bug Causing Infinite Loop #375

Closed gavinvaske closed 1 month ago

gavinvaske commented 1 month ago

Description

In some situations, like not having logged into the site for awhile.

When I tried to navigate to a "ProtectedComponent" a pre-check would occur. Part of this pre-check is to attempt to refresh the user's accessToken via their refreshToken (stored on the server securely 😉 )

However, the situation for handling an expired, or non-existant refreshToken was never handled correctly via the UI.

The server returns a 403 status error when this occurs, but the front-end wasn't handling this error and redirecting the user to the login page correctly. So instead, it attempted to refresh their access token over-and-over-and-over-and....

This PR fixes that