diff --git a/src/Picqer/Financials/Moneybird/Connection.php b/src/Picqer/Financials/Moneybird/Connection.php index 3758f5a..480cd34 100644 --- a/src/Picqer/Financials/Moneybird/Connection.php +++ b/src/Picqer/Financials/Moneybird/Connection.php @@ -68,6 +68,11 @@ class Connection */ private $redirectUrl; + /** + * @var string|null + */ + private ?string $state = null; + /** * @var Client */ @@ -349,6 +354,7 @@ public function getAuthUrl() 'client_id' => $this->clientId, 'redirect_uri' => $this->redirectUrl, 'response_type' => 'code', + 'state' => $this->state, 'scope' => $this->scopes ? implode(' ', $this->scopes) : 'sales_invoices documents estimates bank time_entries settings', ]); } @@ -403,6 +409,14 @@ public function setRedirectUrl($redirectUrl) $this->redirectUrl = $redirectUrl; } + /** + * @param string $state + */ + public function setState(string $state): void + { + $this->state = $state; + } + /** * @return bool */