laravel - Why is it a bad idea to refresh JUST token on every request? -


so i'm building react app laravel api, , jwt token expiring every hour (as it's meant to).

now, i've read few different approaches refreshing token on here, of sound convoluted (storing expiry in state, doing second request whenever api returns 401 etc), seems think it's horrible idea refresh token on every request.

why that?

i'm not familiar react, in terms of jwt, main reason can think of have include new token in every response. forces endpoints act authorization endpoints, whatever main purpose is. think it's better keep authorization endpoint seperate other api endpoints, , make requests when it's necessary refresh.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -