DEV Community

Discussion on: Truly Protected React Routes

Collapse
 
daggala profile image
Daggala Gudmundsdottir

Interesting! So in the case the front end relies on 401 (for example when fetching a refresh token) do you then hide some clues in the response so that the front end will know when to fetch another refresh token ?

Collapse
 
ravavyr profile image
Ravavyr

In that case you could just add a value to the object like "message":"nogo" and use that to determine it, but since all failed responses return the same message it throws a potential hacker off the scent since there's nothing useful to it.

Thread Thread
 
daggala profile image
Daggala Gudmundsdottir

neat! thanks for the tips! :)