PHPackages                             bymayo/oauth2-dribbble - 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. bymayo/oauth2-dribbble

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

bymayo/oauth2-dribbble
======================

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

1.0.2(8y ago)11.7k2[1 PRs](https://github.com/bymayo/php-oauth2-dribbble/pulls)1MITPHPPHP &gt;=5.5.0

Since Dec 14Pushed 6y ago2 watchersCompare

[ Source](https://github.com/bymayo/php-oauth2-dribbble)[ Packagist](https://packagist.org/packages/bymayo/oauth2-dribbble)[ RSS](/packages/bymayo-oauth2-dribbble/feed)WikiDiscussions master Synced 2mo ago

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

Dribbble Provider for OAuth 2.0 Client
======================================

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

[![Latest Version](https://camo.githubusercontent.com/9b6f02269e2fed19b3b7f42992b40d1dc300a84e8eb785d2c26c9d013c04e80b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f437265774c6162732f6f61757468322d6472696262626c652e7376673f7374796c653d666c61742d737175617265)](https://github.com/CrewLabs/oauth2-dribbble/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/215dfb86680816b0a41e8bdb6980409803ca578dbae297702e56c76d3fbdf5b6/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f437265774c6162732f6f61757468322d6472696262626c652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/CrewLabs/oauth2-dribbble)[![Quality Score](https://camo.githubusercontent.com/c4c62feea40b7cb213736811c1b774726e782b1b962ec56332a91d1f208e27b4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f437265774c6162732f6f61757468322d6472696262626c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/CrewLabs/oauth2-dribbble)

This package provides Dribbble 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 crewlabs/oauth2-dribbble

```

Usage
-----

[](#usage)

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

### Authorization Code Flow

[](#authorization-code-flow)

```
require_once('./vendor/autoload.php');
session_start();

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

if (!isset($_GET['code'])) {

    // If we don't have an authorization code then get one
    $authUrl = $provider->getAuthorizationUrl();
    $_SESSION['oauth2state'] = $provider->getState();
    header('Location: '.$authUrl);
    exit;

// Check given state against previously stored one to mitigate CSRF attack
} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {

    unset($_SESSION['oauth2state']);
    exit('Invalid state');

} else {

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

    // Optional: Now you have a token you can look up a users profile data
    try {

        // We got an access token, let's now get the user's details
        $user = $provider->getResourceOwner($token);

        // Use these details to create a new profile
        printf('Hello %s!', $user->getName());

    } catch (Exception $e) {

        // Failed to get user details
        exit('Oh dear...');
    }

    // Use this to interact with an API on the users behalf
    echo $token->getToken();
}
```

Testing
-------

[](#testing)

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

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/CrewLabs/oauth2-dribbble/blob/master/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Dave Baker](https://github.com/fullybaked)
- [Crew Labs](https://github.com/CrewLabs)
- [All Contributors](https://github.com/CrewLabs/oauth2-dribbble/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/CrewLabs/oauth2-dribbble/blob/master/LICENSE) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 84.2% 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 ~220 days

Total

3

Last Release

2994d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a5965e183e46bc8706da3c84d4afdc6df46dc1c41c878894925228780b0e6c2a?d=identicon)[bymayo](/maintainers/bymayo)

---

Top Contributors

[![fullybaked](https://avatars.githubusercontent.com/u/527122?v=4)](https://github.com/fullybaked "fullybaked (16 commits)")[![bymayo](https://avatars.githubusercontent.com/u/522877?v=4)](https://github.com/bymayo "bymayo (3 commits)")

---

Tags

AuthenticationSSOidentityoauthoauth2authorizationidpsingle sign ondribbbleDribble

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/bymayo-oauth2-dribbble/health.svg)

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

###  Alternatives

[adam-paterson/oauth2-slack

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

22694.8k5](/packages/adam-paterson-oauth2-slack)

PHPackages © 2026

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