PHPackages                             cpluscc/oauth2-osu - 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. cpluscc/oauth2-osu

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

cpluscc/oauth2-osu
==================

osu! OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2.2.1(2y ago)0261MITPHPPHP ^8.0

Since Sep 29Pushed 2y ago1 watchersCompare

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

READMEChangelog (4)Dependencies (2)Versions (5)Used By (1)

Amazon Provider for OAuth 2.0 Client
====================================

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

[![Latest Version](https://camo.githubusercontent.com/7ce889ad58ff18f544bf4e013b210e6482bdb352ba50644125c28a96d5645ed5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6c75636869616e656e636f2f6f61757468322d616d617a6f6e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/luchianenco/oauth2-amazon/releases)[![Build Status](https://camo.githubusercontent.com/8ee6e640a0e03602947b2f24239531356dd87b0948901dd8ee64092c06fb9ba0/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c75636869616e656e636f2f6f61757468322d616d617a6f6e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/luchianenco/oauth2-amazon)[![Total Downloads](https://camo.githubusercontent.com/54d9ec420516b2caa66ffacb1bdb1bad96d03f1b887fd36b1f7390c56a057800/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c75636869616e656e636f2f6f61757468322d616d617a6f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/luchianenco/oauth2-amazon)

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

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

[](#installation)

To install the package, use composer:

```
composer require luchianenco/oauth2-amazon

```

Usage
-----

[](#usage)

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

### Authorization Code Flow

[](#authorization-code-flow)

```
$provider = new Luchianenco\OAuth2\Client\Provider\Amazon([
    'clientId'          => '{amazon-client-id}',
    'clientSecret'      => '{amazon-client-secret}',
    'redirectUri'       => 'https://example.com/callback_url',
]);

// Send OAuth Request
// If we don't have an authorization code then we can get one
$authUrl = $provider->getAuthorizationUrl();
$_SESSION['OAuth2State'] = $provider->getState();

...

// OAuth2 Callback URL
// Compare given state against previously stored one to block CSRF attack
if (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['OAuth2State'])) {

    exit('Invalid state');

} else {

    // Try to get an access token
    $token = $provider->getAccessToken('authorization_code', ['code' => $_GET['code']]);

    // Now we can look up users profile
    try {
        // Get the user's details
        $user = $provider->getResourceOwner($token);

        printf('Hello %s!', $user->getName());

    } catch (Exception $e) {
        // Failed to get user details
        exit('Oh no ... ...');
    }

    // We can use token to make other API calls
    echo $token->getToken();
}
```

Testing
-------

[](#testing)

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

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

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

4

Last Release

955d ago

Major Versions

1.1.5 → 2.02023-09-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/06c0a894fdc2c39d89080bd7675d1b5e0913135836b1fa9879518bf9fe296836?d=identicon)[cpluscc](/maintainers/cpluscc)

---

Top Contributors

[![cpluscc](https://avatars.githubusercontent.com/u/62039647?v=4)](https://github.com/cpluscc "cpluscc (3 commits)")

---

Tags

clientAuthenticationoauthoauth2authorizationosu

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cpluscc-oauth2-osu/health.svg)

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

###  Alternatives

[league/oauth2-google

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

41721.2M118](/packages/league-oauth2-google)[cakedc/oauth2-cognito

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

18597.7k](/packages/cakedc-oauth2-cognito)

PHPackages © 2026

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