Yoast / api-libs

4 stars 5 forks source link

Fix continuously obtaining of the refresh tokens #25

Closed andizer closed 9 years ago

andizer commented 9 years ago

Fixes #19

The refresh tokens will be renewed all the time, but this isn't necessary. This fix contains the addition of storing the access token and validation of the expiration of that access token. This means the refresh tokens aren't obtained every page request, but only after access token is expired.

This pull has some consequences for the Google Analytics API implementation for the GA plugin and for the Google Search Console API implementation for the WP SEO plugin. Be sure the pull for GA is merged also to prevent issues.

andizer commented 9 years ago

@Rarst Can you review this pull request to see if this will fix issue #19

omarreiss commented 9 years ago

CR 1 done

andizer commented 9 years ago

This one is ready for another codereview @omarreiss

Rarst commented 9 years ago

Sorry I hadn't got to it before merge, still have a large pile of issues to go through after WCEU. :) Will let you know if I notice any more errant requests.