PHPackages                             codepeak/oauth2-fortnox - 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. codepeak/oauth2-fortnox

ActiveLibrary

codepeak/oauth2-fortnox
=======================

A Fortnox provider for league/oauth2-client

1.0.3(3y ago)14.4k↓50%2[1 PRs](https://github.com/codepeak/oauth2-fortnox/pulls)MITPHPPHP &gt;=8.0

Since Feb 6Pushed 2y ago1 watchersCompare

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

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

Fortnox provider for league/oauth2-client
=========================================

[](#fortnox-provider-for-leagueoauth2-client)

This is a package to integrate [Fortnox](https://developer.fortnox.se/general/authentication/) authentication with the OAuth2 client library by [The League of Extraordinary Packages](https://github.com/thephpleague/oauth2-client).

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

[](#installation)

```
composer require codepeak/oauth2-fortnox
```

Usage
-----

[](#usage)

### Create instance of the provider

[](#create-instance-of-the-provider)

```
$provider = new \Codepeak\OAuth2\Client\Provider\Fortnox([
    'clientId' => "YOUR_CLIENT_ID",
    'clientSecret' => "YOUR_CLIENT_SECRET",
    'redirectUri' => "https://your.redirect.uri/full/url/path/here"
]);
```

### Get authorization URL

[](#get-authorization-url)

```
$authorizationUrl = $provider->getAuthorizationUrl(['scope' => ['companyinformation', 'profile']]);
```

### Get the access token

[](#get-the-access-token)

```
$token = $provider->getAccessToken("authorization_code", [
    'code' => $_GET['code']
]);
```

### Refresh access token

[](#refresh-access-token)

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

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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 ~1 days

Total

4

Last Release

1194d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/199769?v=4)[Codepeak AB](/maintainers/codepeak)[@codepeak](https://github.com/codepeak)

---

Top Contributors

[![robbanl](https://avatars.githubusercontent.com/u/922250?v=4)](https://github.com/robbanl "robbanl (6 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/codepeak-oauth2-fortnox/health.svg)

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

###  Alternatives

[league/oauth2-google

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

42121.2M118](/packages/league-oauth2-google)[thenetworg/oauth2-azure

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

2509.6M48](/packages/thenetworg-oauth2-azure)[stevenmaguire/oauth2-keycloak

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

2275.9M27](/packages/stevenmaguire-oauth2-keycloak)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[tempest/framework

The PHP framework that gets out of your way.

2.1k23.1k9](/packages/tempest-framework)[xeroapi/xero-php-oauth2

Xero official PHP SDK for oAuth2 generated with OpenAPI spec 3

1054.3M14](/packages/xeroapi-xero-php-oauth2)

PHPackages © 2026

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