braintree / braintree_dotnet

Braintree .NET library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
136 stars 73 forks source link

Refresh Token Is Revoked After 24 Hours #87

Closed kokhans closed 5 years ago

kokhans commented 5 years ago

OAuth - Refresh Token Is Revoked After 24 Hours

Issue description

After creating an access token from code OAuth.CreateTokenFromCode(request) we get an object with AccessToken, RefreshToken, ExpiresAt fields successfully. From your docs OAuth (Beta) Access Tokens:

If we will wait 24 hours and will try to use RefreshToken to get new AccessToken and RefreshToken, we will get the next error:

Braintree.ValidationErrorCodeMessage "Invalid grant: refresh token is revoked"

Expected result: We should have the possibility to use RefreshToken for 180 days to get new AccessToken and RefreshToken.

crookedneighbor commented 5 years ago

Are you happening to be using the refresh token more than once? Once you use it the first time, it will be revoked. And the new one returned with the new access token should be used instead.

kokhans commented 5 years ago

I use it only once. So after getting new AccessToken and RefreshToken I will wait for 24 hours and after this period I got an error.

crookedneighbor commented 5 years ago

We'll need someone to look into your account, if you only used the RefreshToken once, it shouldn't expire so early. Please contact out support team so we can look into your account: https://help.braintreepayments.com/