schmorrison / Zoho

Golang API for Zoho services
MIT License
35 stars 34 forks source link

Refresh token after expiration #12

Closed beatscode closed 5 years ago

beatscode commented 5 years ago

In issue #9 I was consistently not able to get fresh tokens after my initial token expired. I noticed that the token was empty after saving the token even if the response from zoho was an invalid code. I wanted to use the refresh token method if the token had expired so this PR tries to do this. The PR also stops an invalid code response from zoho to persist a non-usable token to the filesystem.