It seems there is a new new way of creating tokens and reading created tokens according to the link below. The methods you used to generate tokens build and parse tokens are all deprecated. Would you kindly look at this link and kindly update your post if this makes sense demonstrating Access and RefreshTokens :
github.com/jwtk/jjwt#jws-create-key