Closed pond closed 3 years ago
Do you want to see if this is still an issue with the revised oauth2 work merged into master from #500 and #503 ?
I haven't poked around under the hood to see if it's Xero API side or Xeroizer side.
I'm also seeing null for expire_at
when using renew_access_token
.
@CloCkWeRX Thanks for the reply & suggestion.
I didn't notice the OAuth 2 work until you mentioned it. The PRs appear to contain a huge amount of work; this does make me a bit nervous about early adoption. I see no references at all to any of this in the top level README.md
though - has the gem itself remained entirely 100% API compatible with its clients but now talks OAuth 2 "under the hood", or are there as-yet-undocumented things one must do in order to invoke OAuth 2 support?
v3 of wrapper deprecates OAuth1. In alignment with XeroAPI deprecated OAuth1.
In a Partner Application client instance initialised with an access token via
#authorize_from_access
rather than#authorize_from_request
, the client'sexpires_at
andauthorization_expires_at
values returnnil
. This is quite destructive since Xeroizer has no automated renewal and raises exceptions for expired tokens, making control flow in any non-trivial application very difficult. One cannot proactively defend against unexpected expiry exceptions via renewal based on token expiry date.We've had to kludge around this by storing expiry data in our settings store but that's messy. Either the
expires_at
/authorization_expires_at
accessors should work in all cases, or they should be removed.