PHPackages                             roaresearch/yii2-cognito - 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. roaresearch/yii2-cognito

ActiveYii2-extension

roaresearch/yii2-cognito
========================

09↓100%PHP

Since Jun 18Pushed 2y ago2 watchersCompare

[ Source](https://github.com/ROAResearch/yii2-cognito)[ Packagist](https://packagist.org/packages/roaresearch/yii2-cognito)[ RSS](/packages/roaresearch-yii2-cognito/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 Cognito
============

[](#yii2-cognito)

This Yii2 extension provides a Cognito Authenticator.

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

[](#requirements)

- PHP 8.2 or higher
- [Yii2](https://www.yiiframework.com/) ~2.0.48
- [teamgantt/juhwit](https://github.com/teamgantt/juhwit)

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

[](#installation)

To install the package, you need to install [composer](http://getcomposer.org/download/) and then run the following command:

Usage
-----

[](#usage)

Add `Authenticator` to the `authMethods` section of your `authenticator` component:

```
'authenticator' => [
    'class' => \yii\filters\CompositeAuth::class,
    'oauth2Module' => $this->getOauth2Module(),
    'authMethods' => [
        [
            'class' => \roaresearch\yii2\cognito\Authenticator::class,
            'userModelClass' => 'common\models\User',
            'userPoolId' => '',
            'region' => '',
            'clientIds' => ['clientIds'],
        ],
        [
            'class' => \yii\filters\auth\HttpBearerAuth::class,
        ],
        [
            'class' => \yii\filters\auth\QueryParamAuth::class,
            // !Important, GET request parameter to get the token.
            'tokenParam' => 'accessToken',
        ],
    ],
]
```

Versioning
----------

[](#versioning)

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/ROAResearch/yii2-roa/tags).

Considering [SemVer](http://semver.org/) for versioning rules 9, 10 and 11 talk about pre-releases, they will not be used within the ROAResearch.

Authors
-------

[](#authors)

- [**Angel Guevara**](https://github.com/Faryshta) - Initial work
- [**Carlos Llamosas**](https://github.com/neverabe) - Initial work

See also the list of [contributors](https://github.com/ROAResearch/yii2-roa/graphs/contributors) who participated in this project.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

###  Health Score

14

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 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/2341d88f3cdea0c2474cfbf59e5cf6dab5dd6a026d7846fabf219f2a93be1641?d=identicon)[neverabe](/maintainers/neverabe)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/roaresearch-yii2-cognito/health.svg)

```
[![Health](https://phpackages.com/badges/roaresearch-yii2-cognito/health.svg)](https://phpackages.com/packages/roaresearch-yii2-cognito)
```

PHPackages © 2026

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