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

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

steein/oauth2-steein
====================

Steein OAuth 2.0 Client Provider for The PHP

v1.1(8y ago)023MITPHPPHP ^5.6 || ^7.0

Since Apr 25Pushed 8y agoCompare

[ Source](https://github.com/SteeinRu/oauth2-steein)[ Packagist](https://packagist.org/packages/steein/oauth2-steein)[ RSS](/packages/steein-oauth2-steein/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Steein for OAuth 2.0 Client
===========================

[](#steein-for-oauth-20-client)

This package provides support for Steein OAuth 2.0 for the OAuth 2.0 PHP client.

Requirements
------------

[](#requirements)

The following versions of PHP are supported.

- PHP &gt;= 5.6
- HHVM

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

[](#installation)

To install, use composer:

```
composer require steein/oauth2-steein

```

Usage
-----

[](#usage)

Usage is the same as The OAuth client, using `\Steein\OAuth2\Client\Steein` as the provider.

### Authorization Code Flow

[](#authorization-code-flow)

```
$provider = new \Steein\OAuth2\Client\Steein([
    'clientId'         =>  '{client_id}',
    'clientSecret'     =>  '{client_secret}',
    'redirectUrl'      =>  '{callback_url}',
    'ApiVersion'       =>  '2.0',
]);

if (!isset($_GET['code']))
{
    // Если у нас нет кода авторизации,
    $authUrl = $provider->getAuthorizationUrl();

    echo 'Авторизация через Steein!';

} else {
    // Попробуйте получить токен доступ (используя грант кода авторизации)
    $token = $provider->getAccessToken('authorization_code', [
        'code' => $_GET['code'],
        'grant_type' => 'authorization_code'
    ]);

    try {
        // Теперь у нас есть токен доступ, давайте теперь узнаем подробности пользователя.
        $user = $provider->getResourceOwner($token);

        // $user->get...();
        echo $user->getDisplayName().'';
        echo $user->getAvatar().'';
    } catch (Exception $e) {
        exit('Что та пошло не так');
    }
}
```

License
-------

[](#license)

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

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Total

2

Last Release

3278d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25b3e90822a52d3d64e79e88c911e20e16f8d08ceb759f52ad75884a85a8b302?d=identicon)[Steein](/maintainers/Steein)

---

Tags

clientAuthenticationoauthoauth2authorizationsteeinsteein oauth2

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[league/oauth2-google

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

42222.6M157](/packages/league-oauth2-google)[cakedc/oauth2-cognito

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

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

PHPackages © 2026

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