Problem: how to refresh access token with curl command
I have got the access token, so how I refresh it with my refresh_token, what is the correct curl command to get that ?
My command is : curl -u a2joef57Z67mdPjKbrgct5Bt:r97JqZJknNF7FMhWBWJXeRTp1mDqdxVeuG7JzjvI2QfrRTHZ -XPOST http://127.0.0.1:5008/oauth/token -d '{"grant_type": "refresh_token", "scope":"profile","refresh_token":"azUoo2nwHX1vEU1YeLYVijkynaPfnojXyKiJ5TXLP7w9MfzD"}
response is: {"error": "unsupported_grant_type"}
authorization = AuthorizationServer(
query_client=query_client,
save_token=save_token,
)
authorization.register_grant(grants.ImplicitGrant)
authorization.register_grant(grants.ClientCredentialsGrant)
authorization.register_grant(AuthorizationCodeGrant, [CodeChallenge(required=True)])
authorization.register_grant(PasswordGrant)
authorization.register_grant(RefreshTokenGrant),
the code shows that RefreshTokenGrant has been registered.
Please make sure your register client supports refresh_token grant type.
yes, I have added this kind of grant type in page, it still does not work.