webfox / laravel-xero-oauth2

A Laravel integration for Xero using the Oauth 2.0 spec
MIT License
50 stars 32 forks source link

How to store multiple tenants? #69

Closed tonypartridge closed 2 years ago

tonypartridge commented 2 years ago

The connection works great and is simple out of the box, we can connect and select multiple tenants but the store only stores 1 tenant, the last one selected.

So how do we store all selected tenants so we can get the tenant id in a model selection for instance?

AllanGallop commented 2 years ago

@tonypartridge I have similar requirement, and ended up making some changes to OauthCredentialManager and related Storage services to store tenant ID and Name as an array instead of the first returned orgs TenantID . It's on a fork currently if you want an example

hailwood commented 2 years ago

@AllanGallop looking over your fork, I'd be happy to merge that in if you opened a PR :)

AllanGallop commented 2 years ago

@AllanGallop looking over your fork, I'd be happy to merge that in if you opened a PR :)

Awesome, I'll branch and do so

hailwood commented 2 years ago

4.0.0 Release