I am trying to use Keycloak admin REST API to recreate an access token when I have a valid refresh token.
I have accomplished that, by invoking with POST /auth/realms/{realm}/protocol/openid-connect/token.
The problem is that the endpoint also returns a new refresh token each time. Is this the way a JWT authorisation flow should work?
I think the correct flow would be to only get a new access token when the auth endpoint is invoked, and when the refresh token expires, to sign in again to acquire a new refresh token; Not to get a new refresh token each time we query for a new access token.
I have also read this stack overflow post. Am I missing something here?
You may find a pic with the request below: