PHPackages                             hobbii/cognito-client - 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. hobbii/cognito-client

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

hobbii/cognito-client
=====================

A PHP Library for interacting with AWS Cognito

1.0.1(4y ago)02.5k1MITPHPPHP ^7.1|^7.4|^8.0

Since Mar 30Pushed 3y ago2 watchersCompare

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

READMEChangelog (2)Dependencies (6)Versions (3)Used By (1)

Cognito Client
==============

[](#cognito-client)

[![Coverage Status](https://camo.githubusercontent.com/3419979b7ea88111fda951d8548cdf4f23a165d84cd80ebab6fc13c8fd682b25/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f686f626269692f636f676e69746f2d636c69656e742f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/hobbii/cognito-client?branch=main)[![Total Downloads](https://camo.githubusercontent.com/b07e6458203142422631ef66c619cc84c67fc22aaa3c1cb3269ddfe13700a502/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f686f626269692f636f676e69746f2d636c69656e74)](https://packagist.org/packages/hobbii/cognito-client)[![Latest Version](https://camo.githubusercontent.com/2f93b025c0921d33fc402a687b5a4f416f64ad175c71f2a03b17096ff0a10c30/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686f626269692f636f676e69746f2d636c69656e74)](https://packagist.org/packages/hobbii/cognito-client)[![CI Workflow](https://github.com/hobbii/cognito-client/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/hobbii/cognito-client/actions/workflows/ci.yml/badge.svg?branch=main)

A public composer package for interacting with AWS Cognito.

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

[](#installation)

```
composer require hobbii/cognito-client
```

Usage
-----

[](#usage)

Instantiate the client:

```
use Hobbii\CognitoClient\CognitoClient

$client = CognitoClient::init(
    'EXAMPLEAKIAIOSFODNN7', // AWS Access Key ID
    'EXAMPLEKEYemi/K7MDENG/bPxRfiCYwJalrXUtnF', // AWS Access Key Secret
    'us-west-1', // AWS Region
    '12a34bcde5fgh7ij8kl90mn12o', // Cognito App Client ID
    '12abc3defghi56789jklmnopqrstu012vwxyzabcd34efg56hi7', // Cognito App Client Secret
    'us-west-1_aB12CD34e', // Cognito User Pool ID
);

$authSession = $client->authenticate($username, $password);

$authSession->getAccessToken();
$authSession->getIdToken();
```

Test
----

[](#test)

```
php vendor/bin/phpunit
```

License
-------

[](#license)

All contents of this package are licensed under the [MIT license](LICENSE).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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 ~0 days

Total

2

Last Release

1502d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/17c9099ad550f9ad49fd88011ae02572acc4dcb736ed7b54871546345c0bc763?d=identicon)[Hobbii](/maintainers/Hobbii)

---

Top Contributors

[![MFlor](https://avatars.githubusercontent.com/u/3704257?v=4)](https://github.com/MFlor "MFlor (4 commits)")[![piqoni](https://avatars.githubusercontent.com/u/3144671?v=4)](https://github.com/piqoni "piqoni (1 commits)")

---

Tags

awsphp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/hobbii-cognito-client/health.svg)

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

###  Alternatives

[thenetworg/oauth2-azure

Azure Active Directory OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2509.6M48](/packages/thenetworg-oauth2-azure)[stevenmaguire/oauth2-keycloak

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

2275.9M27](/packages/stevenmaguire-oauth2-keycloak)[robsontenorio/laravel-keycloak-guard

🔑 Simple Keycloak Guard for Laravel

5161.1M3](/packages/robsontenorio-laravel-keycloak-guard)[ellaisys/aws-cognito

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

120220.7k1](/packages/ellaisys-aws-cognito)[patrickbussmann/oauth2-apple

Sign in with Apple OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1132.5M6](/packages/patrickbussmann-oauth2-apple)[wp-graphql/wp-graphql-jwt-authentication

JWT Authentication for WPGraphQL

361118.4k1](/packages/wp-graphql-wp-graphql-jwt-authentication)

PHPackages © 2026

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