verbb / xero

Other
1 stars 6 forks source link

Organisation Authentication Error / Custom cpTrigger #3

Closed acantes closed 3 years ago

acantes commented 3 years ago

Hi Josh,

Thanks for your hard work getting this plugin up and running.

I'm trying to set up a licence to test the plugin, and noticed that once I've setup my Xero account, added the client key and secret to your plugin, then gone to authenticate, I immediately get an error message appear. The plugin is ignoring my custom 'cpTrigger' value set in the project's general.php file. I reverted back to the standard /admin URL and was redirected to Xero's authentication confirm screen. I approved and it then loaded back to the Craft control panel on the Xero Organisation screen where the red warning banner popped up to say that something is wrong.

On the plugin's Settings screen the 'OAuth 2.0 redirect URI' option is set to the value 'https://www.craftcms.docksal/admin/xero/auth' and I cannot change that. Is that right? I've added it to the Xero App's OAuth 2.0 redirect URIs along with what are my own staging and live domains' URLs.

I have a screen recording of what I'm doing if you'd like me to DM it?

Craft 3.6.6 Commerce 3.2.15.2 Xero 1.0.1

moacode commented 3 years ago

Hey @acantes, yes that's a good point—there's currently no support for custom cp triggers. It would be great if you could send the screen recording to hey@joshthe.dev and I'll work on adding support for a custom cp trigger! If you could send me your web.log file that would be great as well.

moacode commented 3 years ago

Hi @acantes, version 1.0.2 is now out that adds support for custom CP triggers!

composer require thejoshsmith/commerce-xero:1.0.2