laravel-xero
laravel-xero copied to clipboard
Disconnecting and reconnecting breaks tokens
Starting with an empty xero_tokens
table and going through the OAuth flow, everything works fine.
However, if you run disconnect and then reconnect later, the tokens seem to break. It's trying to use id=1 as the tenant (which doesn't exist anymore) and in the process manages to wipe out all of the token data.
Workaround is to run
Xero::disconnect();
DB::table('xero_tokens')->truncate();
to disconnect but obviously this could cause an issue for those using multiple tokens at the same time.
I am getting the same problem. Even if you manually delete the first token, it will not work. It seems it will only work when the xero_tokens id=1
@craigrileyuk @mattglover11 can you confirm if this issue is still present? I am struggling to replicate.