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
Post a Comment