PHPackages                             staxxer/oauth2-moneybird - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. staxxer/oauth2-moneybird

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

staxxer/oauth2-moneybird
========================

Moneybird OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1.2.0(4mo ago)02.1kMITPHPPHP ^7.1 || &gt;=8.0 &lt;8.6CI passing

Since Feb 20Pushed 4mo agoCompare

[ Source](https://github.com/marketphase/oauth2-moneybird)[ Packagist](https://packagist.org/packages/staxxer/oauth2-moneybird)[ RSS](/packages/staxxer-oauth2-moneybird/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (5)Used By (0)

Moneybird Provider for OAuth 2.0 Client
=======================================

[](#moneybird-provider-for-oauth-20-client)

This package provides Moneybird OAuth 2.0 support for the PHP League's [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client).

Installation
------------

[](#installation)

```
composer require staxxer/oauth2-moneybird
```

Usage
-----

[](#usage)

```
use Staxxer\OAuth2\Client\Provider\Moneybird;

$provider = new Moneybird([
    'clientId'     => '{moneybird-client-id}',
    'clientSecret' => '{moneybird-client-secret}',
    'redirectUri'  => 'https://example.com/callback',
]);
```

### Authorization

[](#authorization)

```
// Get authorization URL
$authorizationUrl = $provider->getAuthorizationUrl();

// Store state for CSRF validation
$_SESSION['oauth2state'] = $provider->getState();

// Redirect user
header('Location: ' . $authorizationUrl);
```

### Access Token

[](#access-token)

```
// After redirect back from Moneybird
$token = $provider->getAccessToken('authorization_code', [
    'code' => $_GET['code'],
]);

echo $token->getToken();
echo $token->getRefreshToken();
```

### Refresh Token

[](#refresh-token)

```
$token = $provider->getAccessToken('refresh_token', [
    'refresh_token' => $existingToken->getRefreshToken(),
]);
```

### Resource Owner (Administration)

[](#resource-owner-administration)

```
$resourceOwner = $provider->getResourceOwner($token);

// Administration ID
echo $resourceOwner->getId();

// Administration name
echo $resourceOwner->getName();
```

Testing
-------

[](#testing)

```
composer install
vendor/bin/phpunit
```

License
-------

[](#license)

MIT

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance76

Regular maintenance activity

Popularity22

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

133d ago

PHP version history (2 changes)1.0.0PHP ^8.2

1.2.0PHP ^7.1 || &gt;=8.0 &lt;8.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/156292b7c4958833db10b2ee1663a9a876ec04f853d963f3973d4c2981207fc3?d=identicon)[thejager](/maintainers/thejager)

---

Top Contributors

[![dejagersh](https://avatars.githubusercontent.com/u/9981548?v=4)](https://github.com/dejagersh "dejagersh (8 commits)")

---

Tags

clientoauthoauth2moneybirdbookkeeping

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/staxxer-oauth2-moneybird/health.svg)

```
[![Health](https://phpackages.com/badges/staxxer-oauth2-moneybird/health.svg)](https://phpackages.com/packages/staxxer-oauth2-moneybird)
```

###  Alternatives

[thenetworg/oauth2-azure

Azure Active Directory OAuth 2.0 Client Provider for The PHP League OAuth2-Client

25310.7M83](/packages/thenetworg-oauth2-azure)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

42223.4M176](/packages/league-oauth2-google)[stevenmaguire/oauth2-keycloak

Keycloak OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2306.4M45](/packages/stevenmaguire-oauth2-keycloak)[patrickbussmann/oauth2-apple

Sign in with Apple OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1152.8M12](/packages/patrickbussmann-oauth2-apple)[omines/oauth2-gitlab

GitLab OAuth 2.0 Client Provider for The PHP League OAuth2-Client

36779.2k16](/packages/omines-oauth2-gitlab)[mollie/oauth2-mollie-php

Mollie Provider for OAuth 2.0 Client

261.8M1](/packages/mollie-oauth2-mollie-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
