PHPackages                             schibsted/account-sdk-php - 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. schibsted/account-sdk-php

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

schibsted/account-sdk-php
=========================

OAuth2 client for Schibsted account

0.3.0(3y ago)02.6k1MITPHP

Since Sep 11Pushed 3y ago16 watchersCompare

[ Source](https://github.com/schibsted/account-sdk-php)[ Packagist](https://packagist.org/packages/schibsted/account-sdk-php)[ RSS](/packages/schibsted-account-sdk-php/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (4)Used By (0)

Schibsted account Provider for OAuth 2.0 Client
===============================================

[](#schibsted-account-provider-for-oauth-20-client)

[![Build Status](https://camo.githubusercontent.com/d5ea47716b1483125c3fe470a480195fe89eb8a2571d17766a8e97ea070a18be/68747470733a2f2f6170702e7472617669732d63692e636f6d2f7363686962737465642f6163636f756e742d73646b2d7068702e7376673f6272616e63683d6d6173746572)](https://app.travis-ci.com/github/schibsted/account-sdk-php)[![License](https://camo.githubusercontent.com/7d5fc0bdf08aec16ba5a9a553b59a1fa8cca6b7b2dadccd2accb53ec0afe2d1c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7363686962737465642f6163636f756e742d73646b2d7068702e737667)](https://github.com/schibsted/account-sdk-php/blob/master/LICENSE)[![Latest Stable Version](https://camo.githubusercontent.com/03d0b06a0d414d6b54681d7df0e410fe5acf6e7d58e937951d3f468c860e4aae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7363686962737465642f6163636f756e742d73646b2d7068702e737667)](https://packagist.org/packages/schibsted/account-sdk-php)

This package provides Schibsted 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 schibsted/account-sdk-php

```

Usage
-----

[](#usage)

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

### Authorization Code Flow

[](#authorization-code-flow)

You have to provide some parameters to the provider:

- domain:
    - description: The Schibsted account domain to use, e.g
- clientId
    - description: The client ID assigned to you by the provider
- clientSecret
    - description: The client password assigned to you by the provider
- redirectUri

```
$provider = new Schibsted\OAuth2\Client\Provider\Schibsted([
    'domain'       => '{domain}',
    'clientId'     => '{schibsted-client-id}',
    'clientSecret' => '{schibsted-client-secret}',
    'redirectUri'  => 'https://example.com/callback-url'
]);

// Fetch a client token
$token = $provider->getAccessToken('client_credentials');

// Fetch a user token from authorization code
$token = $provider->getAccessToken('authorization_code', [ 'code' => $_GET['code'] ]);

// Fetch Resource owner from user token
$user = $provider->getResourceOwner($token);

// Make an API request to Schibsted account
$req = $provider->getAuthenticatedRequest('GET', 'user/1', $token);
$res = $provider->getParsedResponse($req);

// or to your own service, using the Schibsted account token that you can introspect locally
$req = $provider->getAuthenticatedRequest('GET', 'https://myapi.com/resource/1', $token);
$res = $provider->getParsedResponse($req);

// Refreshing a token
if ($token->hasExpired()) {
    $token = $provider->getAccessToken('refresh_token', [
        'refresh_token' => $token->getRefreshToken()
    ]);
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity46

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

Total

3

Last Release

1117d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/75325830?v=4)[Christopher Schachter](/maintainers/SchAcc)[@schacc](https://github.com/schacc)

---

Top Contributors

[![joawan](https://avatars.githubusercontent.com/u/988752?v=4)](https://github.com/joawan "joawan (15 commits)")

---

Tags

clientoauth2authorizationschibsted

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/schibsted-account-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/schibsted-account-sdk-php/health.svg)](https://phpackages.com/packages/schibsted-account-sdk-php)
```

###  Alternatives

[league/oauth2-google

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

41721.2M117](/packages/league-oauth2-google)[thenetworg/oauth2-azure

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

2509.6M47](/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)[patrickbussmann/oauth2-apple

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

1132.5M6](/packages/patrickbussmann-oauth2-apple)[mollie/oauth2-mollie-php

Mollie Provider for OAuth 2.0 Client

251.7M1](/packages/mollie-oauth2-mollie-php)[omines/oauth2-gitlab

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

36721.5k13](/packages/omines-oauth2-gitlab)

PHPackages © 2026

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