langleyfoxall / xero-laravel

💸 Access the Xero accounting system using an Eloquent-like syntax
https://packagist.org/packages/langleyfoxall/xero-laravel
GNU Lesser General Public License v3.0
85 stars 40 forks source link

Upgrade to oauth2 #24

Closed parkourben99 closed 4 years ago

parkourben99 commented 4 years ago

Update to use oauth2.

I was thinking about adding something helpful to generate the token and tenant_id, but not sure if that is in scope of this package.

Let me know your thoughts.

DivineOmega commented 4 years ago

Thanks for the this @parkourben99. Looks like a good start.

The plan here was to make this package support for the full OAuth2 flow, including generation of the Xero login URL and handling of the redirect from Xero. The application object could then be instantiated using the token and tenant ID received from Xero.

parkourben99 commented 4 years ago

Sounds good. I'll update this with required flow.

dextermb commented 4 years ago

@DivineOmega @parkourben99 Has this been looked at since? Has any progress been made?

DivineOmega commented 4 years ago

@parkourben99 I'm going to get this merged in now as it is very useful as it stands for the migration of Xero 'private' apps to the OAuth2.

We'll be needing the full OAuth2 flow very soon ourselves, so @dextermb will begin work on this shortly. This will likely involve the creation of another class to generate the redirect URL and handle the redirect from Xero.

Thanks again! :tada: