PHPackages                             phpnexus/oauth2-freee - 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. phpnexus/oauth2-freee

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

phpnexus/oauth2-freee
=====================

Freee OAuth 2.0 support for the PHP League's OAuth 2.0 Client

130PHP

Since Feb 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/phpnexus/oauth2-freee)[ Packagist](https://packagist.org/packages/phpnexus/oauth2-freee)[ RSS](/packages/phpnexus-oauth2-freee/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Freee Provider for OAuth 2.0 Client
===================================

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

[![Actions Status](https://github.com/phpnexus/oauth2-freee/workflows/Pipeline/badge.svg)](https://github.com/phpnexus/oauth2-freee/actions)[![Coverage Status](https://camo.githubusercontent.com/e42746a6011247c15f631a7e638fc189890fbbe751d133f993c72fef50fca54a/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f7068706e657875732f6f61757468322d66726565652f6d61696e2e737667)](https://coveralls.io/github/phpnexus/oauth2-freee?branch=main)[![License](https://camo.githubusercontent.com/f199c9749257eb7584b2be3581e2f33939f2a08eb66eaa2948566f09edad6cd4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7068706e657875732f6f61757468322d66726565652e737667)](https://github.com/phpnexus/oauth2-freee/blob/main/LICENSE)[![Version](https://camo.githubusercontent.com/25260c4420a4731d5549c8be7be8f4410f10b0a6c90c171149f0c9c478e23829/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068706e657875732f6f61757468322d66726565652e737667)](https://packagist.org/packages/phpnexus/oauth2-freee)[![Downloads](https://camo.githubusercontent.com/ac0bfd6611a4c399f97f55446f5354d57bbd327c2d85e72973a6b7ad7e61a282/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068706e657875732f6f61757468322d66726565652e737667)](https://packagist.org/packages/phpnexus/oauth2-freee/stats)

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

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

[](#installation)

To install, use composer:

```
composer require phpnexus/oauth2-freee

```

Usage
-----

[](#usage)

Usage is the same as The League's OAuth client, using `\PhpNexus\OAuth2\Client\Provider\Freee` as the provider.

### Authorization Code Flow

[](#authorization-code-flow)

```
$provider = new PhpNexus\OAuth2\Client\Provider\Freee([
    'clientId'          => '{freee-app-client-id}',
    'clientSecret'      => '{freee-app-client-secret}',
    'redirectUri'       => 'https://example.com/redirect-url'
]);
```

For further usage of this package please refer to the [core package documentation on "Authorization Code Grant"](https://github.com/thephpleague/oauth2-client#usage).

### Refreshing a Token

[](#refreshing-a-token)

Once your application is authorized, you can refresh an expired token using a refresh token rather than going through the entire process of obtaining a brand new token. To do so, simply reuse this refresh token from your data store to request a refresh.

```
$existingAccessToken = getAccessTokenFromYourDataStore();

if ($existingAccessToken->hasExpired()) {
    $newAccessToken = $provider->getAccessToken('refresh_token', [
        'refresh_token' => $existingAccessToken->getRefreshToken()
    ]);

    // Purge old access token and store new access token to your data store.
}
```

For further usage of this package please refer to the [core package documentation on "Refreshing a Token"](https://github.com/thephpleague/oauth2-client#refreshing-a-token).

Testing
-------

[](#testing)

```
$ ./vendor/bin/phpunit
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/phpnexus/oauth2-freee/blob/main/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Mark Prosser](https://github.com/markinjapan)
- [All Contributors](https://github.com/phpnexus/oauth2-freee/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/phpnexus/oauth2-freee/blob/main/LICENSE) for more information.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3fd086657d547f6bf3353c72fbfc7be23b714cb00dbefde6f79a45a4b146ea61?d=identicon)[markinjapan](/maintainers/markinjapan)

---

Top Contributors

[![markinjapan](https://avatars.githubusercontent.com/u/5118865?v=4)](https://github.com/markinjapan "markinjapan (18 commits)")

### Embed Badge

![Health badge](/badges/phpnexus-oauth2-freee/health.svg)

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

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[beatswitch/lock

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)[amocrm/amocrm-api-library

amoCRM API Client

182728.5k6](/packages/amocrm-amocrm-api-library)[vonage/jwt

A standalone package for creating JWTs for Vonage APIs

424.1M4](/packages/vonage-jwt)

PHPackages © 2026

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