authlib / example-oauth2-server

Example for OAuth 2 Server for Authlib.
https://authlib.org/
684 stars 285 forks source link

Refresh Token #64

Closed Fizmath closed 3 years ago

Fizmath commented 4 years ago

Hello

I followed the steps : after curl -u "xxxx...":"xxxx..." -XPOST http://0.0.0.0:8080/oauth/token -F grant_type=password -F username="me" -F password=valid -F scope=profile

i got the response in Ubuntu terminal :

{"access_token": "xxxx..", "expires_in": 864000, \ "refresh_token": "xxxx..", "scope": "profile", "token_type": "Bearer"}

how to curl the refresh_token ? should we include something here ? :

include

I wish there would be a complete example

Thanks

lepture commented 3 years ago

You need to add refresh_token grant type here. Then curl with -F grant_type=refresh_token

ZTAP0011 commented 3 years ago

Hello @lepture , I have one query in the above discussion first time when I make a request to -XPOST http://0.0.0.0:8080/oauth/token by passing the oauth code, at that time I only get access_token in response but not the request token.