intuit / oauth-jsclient

Intuit's NodeJS OAuth client provides a set of methods to make it easier to work with OAuth2.0 and Open ID
https://developer.intuit.com/
Apache License 2.0
121 stars 156 forks source link

client support for autoRefresh on the access token #34

Closed abisalehalliprasan closed 4 years ago

abisalehalliprasan commented 4 years ago

Goal : The client should handle refreshing the access tokens before the expiry ( once every hour ). This feature should be optional and should be able to available during the time of instantiation of oAuthClient as shown below


    clientId: '<Enter your clientId>',
    clientSecret: '<Enter your clientSecret>',
    environment: 'sandbox' || 'production',
    redirectUri: '<Enter your callback URL>'
    autoRefresh: true  // default false
});```
sthang commented 4 years ago

I would like to be assigned to this issue for hacktoberfest.

vnarayanan26 commented 4 years ago

@sthang Are you working on this? I would like to pick it up if you are not.

sthang commented 4 years ago

@vibu267 I'm working on this. Thanks for asking.

ch3rr17 commented 4 years ago

@abisalehalliprasan I would like to look into this too as well.

brunocascio commented 4 years ago

Any progress here? I'm facing an issue with refresh() method (error invalid_grant)

abisalehalliprasan commented 4 years ago

@brunocascio : This issue was created as an enhancement request. The PR is yet to be tested.

However, if your concern is just regarding the error invalid_grant Could you provide the intuit-tid from response headers when the refresh() call is made ?

There could be many reasons :

If you want to contact our support team, you can find all the details on our support page : https://help.developer.intuit.com/s/