PHPackages                             skt-t1-byungi/oauth2-naver - 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. skt-t1-byungi/oauth2-naver

ActiveLibrary

skt-t1-byungi/oauth2-naver
==========================

Naver OAuth 2.0 Client Provider

0.1.0(8y ago)124MITPHP

Since May 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/skt-t1-byungi/oauth2-naver)[ Packagist](https://packagist.org/packages/skt-t1-byungi/oauth2-naver)[ RSS](/packages/skt-t1-byungi-oauth2-naver/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

Naver Provider for OAuth 2.0 Client
===================================

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

This package provides Naver OAuth 2.0 support for the PHP League's OAuth 2.0 Client.

Usage
-----

[](#usage)

### Authorization Code Flow

[](#authorization-code-flow)

```
$provider = new SktT1Byungi\OAuth2\Client\Provider\Naver([
    'clientId'          => '{naver-client-id}',
    'clientSecret'      => '{naver-client-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->getId());

    } 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();
}
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity54

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

Unknown

Total

1

Last Release

3281d ago

### Community

---

Top Contributors

[![skt-t1-byungi](https://avatars.githubusercontent.com/u/16894698?v=4)](https://github.com/skt-t1-byungi "skt-t1-byungi (4 commits)")

### Embed Badge

![Health badge](/badges/skt-t1-byungi-oauth2-naver/health.svg)

```
[![Health](https://phpackages.com/badges/skt-t1-byungi-oauth2-naver/health.svg)](https://phpackages.com/packages/skt-t1-byungi-oauth2-naver)
```

PHPackages © 2026

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