Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose consumer issue #122

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

brianhenryhf
Copy link
Contributor

Update to allow for differentiating an invalid user access token from bad consumer creds in #renew_access_token call. Xero gives us this info in the response body from POST https://api.xero.com/oauth/AccessToken via body params (listed in https://developer.xero.com/documentation/auth-and-limits/oauth-issues), but current impl doesn't distinguish b/w these cases and eats the details.

Allowing distinction allows a front-end to prompt a user to re-auth if their access token is bad, but not prompt if the problem is bad consumer creds (as those will continue to fail until a developer/admin fixes the issue). Implementation details swiped from https://github.com/xero-gateway/xero_gateway/blob/master/lib/xero_gateway/http.rb#L90.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant