this is how we can use jwt token & jwt token refresh to auth api calls.
-
first we have to use user
usernamewhich is the default for both packages or it wont work, i couldnt find away to get it to work with email, specialylexik/jwt-authentication-bundle -
second we intercept requests to check if the jwt token has expired & if so we recreate new tokens and update request & response headers.