btcpayserver / woocommerce-plugin

Plugin for connecting Woocommerce with BTCPayServer
https://btcpayserver.org/
Other
51 stars 41 forks source link

Access Denied When Trying To Get A Pairing Code #34

Closed gianisss closed 5 years ago

gianisss commented 5 years ago

Whenever I try to get a pairing code for my store the https://btcpay.host/api-tokens, it redirects me to basically a blank page (only the Header with menu plus footer are visible the rest in between where the pairing should happen is blank).

The only feedback I can get is the structure of the URL:

https://btcpay.host/Account/AccessDenied?ReturnUrl=%2Fapi-tokens

Can't quite figure out what's wrong. The SSL is set up properly - no browser notifications, using https://www.ssllabs.com/ssltest my BTCPay server is ranked A+ my WP site is ranked A

pavlenex commented 5 years ago

Replicated, this is indeed a bug. Thanks for reporting.

Pinging @Kukks @NicolasDorier

Users can't go directly to https://mainnet.demo.btcpayserver.org/api-tokens instead they're redirected to Account/AccessDenied?ReturnUrl=%2Fapi-tokens

pavlenex commented 5 years ago

@gianisss what you can do is pair manually. This is a workaround.

In your BTCPay, go Stores > Settings > Access Tokens > Create access token. Leave it empty, though you can add label name.

Screenshot 2019-11-02 at 13 32 32

Click Request Pairing. Then Approve. Copy the Server initiated pairing code in your WooCommerce. And save changes in Woo.

gianisss commented 5 years ago

Worked with the manual pairing as described by @pavlenex Thank you! Will keep it open since you confirmed it is a bug and leave it up to the devs to close it

pavlenex commented 5 years ago

Glad to hear that, yup, let's leave it opened since it's a bug that has to be addressed.

NicolasDorier commented 5 years ago

I am on it, probably caused by me during permission refactoring.

NicolasDorier commented 5 years ago

Closing this, will release a new version of btcpay today with this bug fix (1.0.3.136)