PHPackages                             tunerprime/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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. tunerprime/oauth2-naver

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

tunerprime/oauth2-naver
=======================

Naver OAuth 2.0 Client

06PHP

Since Aug 29Pushed 7y ago1 watchersCompare

[ Source](https://github.com/tunerprime/oauth2-naver)[ Packagist](https://packagist.org/packages/tunerprime/oauth2-naver)[ RSS](/packages/tunerprime-oauth2-naver/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

oauth2-naver
============

[](#oauth2-naver)

extension league/OAuth2-client version by Naver

Composer Install

```
    composer require tunerprime/oauth2-naver

```

Example Code

```
    $provider = new TunerPrime\OAuth2\Client\Provider\Naver([
        'clientId'     => '{naver-client-id}',
        'clientSecret' => '{naver-client-secret}',
        'redirectUri'  => '{your-redirect-uri}',
    ]);

    if (!empty($_GET['error'])) {

        exit('Got error: ' . htmlspecialchars($_GET['error'], ENT_QUOTES, 'UTF-8'));

    } elseif (empty($_GET['code'])) {

        $authUrl = $provider->getAuthorizationUrl();
        $_SESSION['oauth2state'] = $provider->getState();
        header('Location: ' . $authUrl);
        exit;

    } elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {
        unset($_SESSION['oauth2state']);
        exit('Invalid state');

    } else {

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

        try {

            $ownerDetails = $provider->getResourceOwner($token);

            printf('Hello %s!', $ownerDetails->getEmail());

        } catch (Exception $e) {

            exit('Something went wrong: ' . $e->getMessage());

        }

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

        // Number of seconds until the access token will expire, and need refreshing
        echo $token->getExpires();
    }

```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/tunerprime-oauth2-naver/health.svg)

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

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

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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