schmorrison / Zoho

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

Add "Invalid Client Secret" Error handling to oauth2 authorization functions #34

Closed ysahil97 closed 3 years ago

ysahil97 commented 3 years ago

During my usage of this zoho library, errors returned by zoho of type "invalid_client_secret" were not detected properly and this caused some issues to debug when it occurred. This PR supplies error handling pertaing to this error.

Reproduction: To test this feature, while using zoho credentials, use ZOHO_CLIENT_ID properly and provide a wrong key for ZOHO_CLIENT_SECRET. If using self-client, provide ZOHO_AUTH_CODE properly.