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

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

ellaisys/aws-cognito
====================

Laravel Authentication using AWS Cognito (Web and API)

v2.0.7(2w ago)121269.8k↓47.6%58[4 issues](https://github.com/ellaisys/aws-cognito/issues)[2 PRs](https://github.com/ellaisys/aws-cognito/pulls)1MITPHPPHP ^7.4|^8.0CI passing

Since Oct 2Pushed 1w ago3 watchersCompare

[ Source](https://github.com/ellaisys/aws-cognito)[ Packagist](https://packagist.org/packages/ellaisys/aws-cognito)[ Docs](https://ellaisys.github.io/aws-cognito/)[ RSS](/packages/ellaisys-aws-cognito/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (24)Versions (67)Used By (1)

[![Laravel Authentication using AWS Cognito - Web and API](./assets/images/banner.png)](./assets/images/banner.png)

Laravel Authentication using AWS Cognito
========================================

[](#laravel-authentication-using-aws-cognito)

Note

Last Updated: 2026-07-31

[![Release Version](https://camo.githubusercontent.com/85a21932325f0dcb39763e44c1f0b4b8d48152bac0ec64a44922af6b0771d8b3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656c6c61697379732f6177732d636f676e69746f3f7374796c653d666c61742d737175617265266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465736d6f6b65266c6162656c3d52656c6561736525433225413056657273696f6e)](https://packagist.org/packages/ellaisys/aws-cognito#v1.1.3) [![Release Date](https://camo.githubusercontent.com/adea13562421753a96cb035f5f529b16265645075649dd0a06fa7e6c10207f36/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f656c6c61697379732f6177732d636f676e69746f3f7374796c653d666c61742d737175617265266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465736d6f6b65266c6162656c3d52656c6561736525433225413044617465)](https://packagist.org/packages/ellaisys/aws-cognito) [![Total Downloads](https://camo.githubusercontent.com/01adfe62cb8ecd3dde4706503a31302d008a3a9b188e1bcf8fc8c26ad8266323/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656c6c61697379732f6177732d636f676e69746f3f7374796c653d666c61742d737175617265266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465736d6f6b65266c6162656c3d446f776e6c6f616473)](https://packagist.org/packages/ellaisys/aws-cognito)

[![GitHub Stars](https://camo.githubusercontent.com/34cbb11b3e5603691cd7bee430c5a6324c6bb5f12e09695e47aafba79ae33675/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f656c6c61697379732f6177732d636f676e69746f3f7374796c653d666c61742d737175617265266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465736d6f6b65266c6162656c3d5374617273)](https://camo.githubusercontent.com/34cbb11b3e5603691cd7bee430c5a6324c6bb5f12e09695e47aafba79ae33675/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f656c6c61697379732f6177732d636f676e69746f3f7374796c653d666c61742d737175617265266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465736d6f6b65266c6162656c3d5374617273) [![GitHub Forks](https://camo.githubusercontent.com/9d0f11f51fb264dc4267d7ec62210463f883ead92bcded21ca0ad90afd8cb869/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f656c6c61697379732f6177732d636f676e69746f3f7374796c653d666c61742d737175617265266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465736d6f6b65266c6162656c3d466f726b73)](https://camo.githubusercontent.com/9d0f11f51fb264dc4267d7ec62210463f883ead92bcded21ca0ad90afd8cb869/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f656c6c61697379732f6177732d636f676e69746f3f7374796c653d666c61742d737175617265266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465736d6f6b65266c6162656c3d466f726b73) [![GitHub Contributors](https://camo.githubusercontent.com/45a5476519c81a03969e26837bea2bb967ad2afc4bf6f04b479868e694d0c311/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732d616e6f6e2f656c6c61697379732f6177732d636f676e69746f3f7374796c653d666c6174266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465736d6f6b65266c6162656c3d436f6e7472696275746f7273)](https://github.com/ellaisys/aws-cognito/graphs/contributors?all=1) [![APM](https://camo.githubusercontent.com/137b17b277ac5dac3d9aeac7c2b5a0a647fd1b1a8689216fb3030f4c995af98f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f656c6c61697379732f6177732d636f676e69746f3f7374796c653d666c61742d737175617265266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465736d6f6b65266c6162656c3d4c6963656e7365)](LICENSE.md)

[![Quality Gate Status](https://camo.githubusercontent.com/4db9da3fdbac18cf119a320eb7bdfe0595f51cb2ac7b84292dc6e7f798ee2edd/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d656c6c61697379735f6177732d636f676e69746f266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/summary/new_code?id=ellaisys_aws-cognito) [![Security Rating](https://camo.githubusercontent.com/c867ee9a5d3fea270c919d831a2ea2951c88b8f5bfeebe67e2d1067204f8ce41/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d656c6c61697379735f6177732d636f676e69746f266d65747269633d73656375726974795f726174696e67)](https://sonarcloud.io/summary/new_code?id=ellaisys_aws-cognito) [![Maintainability Rating](https://camo.githubusercontent.com/854c86ffd6d68752f20b3ac80b25003f75f79bf69f017642c7ca530c4d25ec02/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d656c6c61697379735f6177732d636f676e69746f266d65747269633d7371616c655f726174696e67)](https://sonarcloud.io/summary/new_code?id=ellaisys_aws-cognito)

Contents
--------

[](#contents)

- [Introduction](#introduction)
    - [Demo Application &amp; Code](#demo-application--code)
    - [Compatibility](#compatibility)
- [Features](#features)
- [Architecture and Design](#architecture-and-design)
- [Installation](#installation)
- [Quick Start &amp; Configurations](./docs/README_CONFIG.md#contents)
- [References](#references)
- [Usage](#usage)
- [Code Quality](#code-quality)
- [Changelog](#changelog)
- [Security](#security)
- [Roadmap](#roadmap)
- [FAQs](./docs/FAQ.md)
- [Credits &amp; Contributors](#credits--contributors)
    - [Contribute](#contribute)
- [Support Us](#support-us)
    - [Sponsor the Project](#sponsor-the-project)
- [License](#license)
- [Disclaimer](#disclaimer)

Introduction
------------

[](#introduction)

*This package provides native integration between Laravel's authentication system and Amazon Cognito. It supports session-based authentication for web applications, token-based authentication for APIs, Multi-Factor Authentication (MFA), SRP authentication, Passkeys (FIDO2/WebAuthn), and Device Authentication while allowing developers to continue using Laravel's familiar authentication features.*

It integrates AWS Cognito into Laravel's authentication ecosystem while preserving Laravel's native authentication experience.

This is built on top of the AWS Cognito SDK for PHP, to provide a simple and easy-to-use experience for interacting with the AWS Cognito service. The package provides a set of traits that can be used in your Laravel controllers to handle all the authentication-related features.

### *Demo Application &amp; Code*

[](#demo-application--code)

A complete demo application is available that demonstrates the package in a real Laravel application. It can be used as a reference implementation or as a starting point for your own projects.

The [demo application code](https://github.com/ellaisys/demo_cognito_app) is available on the GitHub and can be used as a reference for your own application.

### *Compatibility*

[](#compatibility)

PHP Support

Laravel Support

VersionSupport7.4Yes ✔️8.0Yes ✔️8.1Yes ✔️8.2Yes ✔️8.3NA8.4NAVersionSupport7.xYes ✔️8.xYes ✔️9.xYes ✔️10.xYes ✔️11.xYes ✔️12.xYes ✔️13.xNA Features
--------

[](#features)

- Authentication

    - [Core IAM](./docs/README_CORE.md)

        SupportsUser Invitation &amp; Registration ✔️User Verification ✔️User Login &amp; Logout ✔️Forgot Password ✔️Password Reset ✔️Session Authentication ✔️API Authentication ✔️Laravel Guards ✔️[More](./docs/FEATURES.md#features)
    - [SRP](./docs/README_SRP.md) ***New Feature***
    - [Remembered Devices](./docs/README_DEVICE_AUTH.md) ***New Feature***
- Security

    - [Multi-Factor Authentication (MFA)](./docs/README_MFA.md) ***Updated***
    - [FIDO2 Security Keys (Passkeys)](./docs/README_FIDO2.md) ***Updated***
- Laravel

    - [Preconfigured Routes and Controllers](./docs/README_ROUTES.md) ***Updated***

Architecture and Design
-----------------------

[](#architecture-and-design)

The following diagram illustrates the high level architecture and design of this package, highlighting its integration with Laravel's authentication system and AWS Cognito services.

[![Laravel Authentication using AWS Cognito - Architecture and Design](./assets/images/aws_cognito_package_architecture.png)](./assets/images/aws_cognito_package_architecture.png)

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

[](#installation)

This package is available via [Packagist](https://packagist.org/packages/ellaisys/aws-cognito) and can be installed using composer.

```
composer require ellaisys/aws-cognito
```

Code Quality
------------

[](#code-quality)

This project follows secure coding and quality assurance practices throughout its development lifecycle. Automated static analysis is performed using SonarCloud to identify potential bugs, vulnerabilities, maintainability issues, and code smells before changes are merged.

In addition to automated analysis, all contributions are reviewed before being merged to help maintain the quality, reliability, and security of the project.

Changelog
---------

[](#changelog)

For a complete history of changes, improvements, bug fixes, and new features, please refer to the [CHANGELOG.md](CHANGELOG.md).

Security
--------

[](#security)

The security of this project and its users is important to us. If you discover or suspect a security vulnerability, please follow our responsible disclosure process described in [SECURITY.md](SECURITY.md).

We kindly ask that you **do not report security vulnerabilities through public GitHub issues**.

Roadmap
-------

[](#roadmap)

Our development roadmap, planned features, and future enhancements are maintained on the project's GitHub Projects and Wiki.

- [GitHub Project Board](https://github.com/orgs/ellaisys/projects/2)
- [Project Wiki Roadmap](https://github.com/ellaisys/aws-cognito/wiki/RoadMap)

Credits &amp; Contributors
--------------------------

[](#credits--contributors)

This project has been inspired by the work of the open-source community. We are grateful to the developers and maintainers whose ideas, discussions, libraries, and code have helped influence the design and implementation of this package.

We would like to acknowledge the following projects and organizations for their inspiration, technical references, or contributions. Portions of this project were adapted from the following open-source projects in accordance with their respective licenses:

- **Pod-Point** –
- **black-bits/laravel-cognito-auth** –
- **tymondesigns/jwt-auth** –

Special thanks to everyone who has contributed their time, expertise, and feedback to help improve this project.

- **EllaiSys Team** –
- **Project Contributors** –

### *Contribute*

[](#contribute)

Open source thrives because of its community. Whether you're fixing bugs, improving documentation, reviewing code, suggesting new features, or helping other users, every contribution is valued and appreciated.

If you'd like to get involved, explore the contribution badges below to find ways you can help.

[![GitHub repo Issues](https://camo.githubusercontent.com/506b6ea16771b5d40119966bd1df4e07b304f053ddc8020869ae8cd45f0f3953/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f656c6c61697379732f6177732d636f676e69746f3f7374796c653d666c6174266c6f676f3d676974687562266c6f676f436f6c6f723d726564266c6162656c3d497373756573)](https://github.com/ellaisys/aws-cognito/issues) [![GitHub repo Good Issues for newbies](https://camo.githubusercontent.com/bd6da50c630c350d7c57f5cacf1076411947392ad3eb0cdbdff96412f63aa340/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f656c6c61697379732f6177732d636f676e69746f2f676f6f64253230666972737425323069737375653f7374796c653d666c6174266c6f676f3d676974687562266c6f676f436f6c6f723d677265656e266c6162656c3d476f6f642532304669727374253230697373756573)](https://github.com/ellaisys/aws-cognito/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) [![GitHub Help Wanted issues](https://camo.githubusercontent.com/b1ba91ed4072028a14992e579683ed45e3bf20e5d381f29be1b5e17a611a3ed4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f656c6c61697379732f6177732d636f676e69746f2f68656c7025323077616e7465643f7374796c653d666c6174266c6f676f3d676974687562266c6f676f436f6c6f723d623534356431266c6162656c3d25323248656c7025323057616e746564253232253230697373756573)](https://github.com/ellaisys/aws-cognito/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
[![GitHub repo PRs](https://camo.githubusercontent.com/40dc182fe295e585f192597fc7e9f295d89b8c5eb7f7249e81859052853d2daa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f656c6c61697379732f6177732d636f676e69746f3f7374796c653d666c6174266c6f676f3d676974687562266c6f676f436f6c6f723d6f72616e6765266c6162656c3d505273)](https://github.com/ellaisys/aws-cognito/pulls) [![GitHub repo Merged PRs](https://camo.githubusercontent.com/c3b71346a151032f7a33ae79ae88ddb600adc48c0d3e5906306d2f24c8560c05/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d7365617263682f656c6c61697379732f6177732d636f676e69746f3f7374796c653d666c6174266c6f676f3d676974687562266c6f676f436f6c6f723d677265656e266c6162656c3d4d65726765642532305052732671756572793d69732533416d6572676564)](https://github.com/ellaisys/aws-cognito/pulls?q=is%3Apr+is%3Amerged) [![GitHub Help Wanted PRs](https://camo.githubusercontent.com/b12874750d76938443b1e7d5e40c43ef4347bf16f821e10da5ba94466c2bf05e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f656c6c61697379732f6177732d636f676e69746f2f68656c7025323077616e7465643f7374796c653d666c6174266c6f676f3d676974687562266c6f676f436f6c6f723d623534356431266c6162656c3d25323248656c7025323057616e746564253232253230505273)](https://github.com/ellaisys/aws-cognito/pulls?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)

Support Us
----------

[](#support-us)

EllaiSys was a web engineering and technology consulting company specializing in Cloud Computing (AWS and Azure), DevOps, Identity and Access Management (IAM), and Product Engineering. Although we concluded our professional services business in October 2021, we remain committed to maintaining and improving our open-source projects for the benefit of the community.

If this project has been helpful to you or your organization, we'd love your support. There are several ways you can contribute:

- **Give some love** by starring the repository on GitHub, sharing it with your network, or recommending it to others.
- **Spread the word** by writing blog posts, creating tutorials, or giving talks about the project.
- **Contribute code** by fixing bugs, implementing new features, or improving performance.
- **Report issues** and help us identify bugs or edge cases.
- **Improve the documentation** by correcting errors, adding examples, or enhancing clarity.
- **Share ideas** by suggesting new features or improvements.
- **Help others** by answering questions and participating in community discussions.
- **Spread the word** by starring the repository, sharing it with your network, or recommending it to others.

### *Sponsor the Project*

[](#sponsor-the-project)

Maintaining a high-quality open-source project requires a significant investment of time and effort. If you'd like to support its continued development financially, your sponsorship is greatly appreciated. Every contribution—regardless of size—helps us dedicate more time to maintaining the project, fixing issues, implementing new features, and improving the documentation.

Whether you contribute your time, expertise, or financial support, thank you for helping us build better software for the community.

License
-------

[](#license)

This package is open-source software released under the MIT License.

The source code is available on GitHub and may be used, copied, modified, merged, published, distributed, sublicensed, and/or sold in accordance with the terms of the MIT License.

A copy of the license is included with this package in the [License](LICENSE.md) file. Please review the license before using, modifying, or redistributing this software.

Disclaimer
----------

[](#disclaimer)

This package is actively maintained and continuously improved.

We welcome bug reports, feature requests, and other feedback from the community. While we will make every reasonable effort to review and address reported issues, support is provided on a voluntary, best-effort basis. As this is an open-source project offered free of charge, we are unable to guarantee response times, issue resolution, or support service level agreements (SLAs).

###  Health Score

66

—

FairBetter than 99% of packages

Maintenance96

Actively maintained with recent releases

Popularity53

Moderate usage in the ecosystem

Community29

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 69.6% 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 ~42 days

Recently: every ~19 days

Total

51

Last Release

18d ago

Major Versions

v0.1.13 → v1.0.02021-07-14

v1.4.1 → v2.0.02026-03-13

PHP version history (5 changes)v0.1.0PHP ^7.2.5

v0.1.3PHP ^7.0

v1.0.0PHP &gt;=7.0

v1.0.1PHP ^7.0|^8.0

v2.0.5PHP ^7.4|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20050863?v=4)[EllaiSys](/maintainers/ellaisys)[@ellaisys](https://github.com/ellaisys)

![](https://www.gravatar.com/avatar/8a16481c18ce9a217dc2ae1325163087756f4f15ea76133cd28e91ebc59a667a?d=identicon)[amitdhongde](/maintainers/amitdhongde)

---

Top Contributors

[![amitdhongde](https://avatars.githubusercontent.com/u/24870900?v=4)](https://github.com/amitdhongde "amitdhongde (64 commits)")[![fpena](https://avatars.githubusercontent.com/u/440097?v=4)](https://github.com/fpena "fpena (8 commits)")[![farnsworthMars](https://avatars.githubusercontent.com/u/1650516?v=4)](https://github.com/farnsworthMars "farnsworthMars (5 commits)")[![pitchayakit](https://avatars.githubusercontent.com/u/17026022?v=4)](https://github.com/pitchayakit "pitchayakit (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![Aniruddh-J](https://avatars.githubusercontent.com/u/1218651?v=4)](https://github.com/Aniruddh-J "Aniruddh-J (2 commits)")[![minhchu](https://avatars.githubusercontent.com/u/14136809?v=4)](https://github.com/minhchu "minhchu (1 commits)")[![sunnydesign](https://avatars.githubusercontent.com/u/36501326?v=4)](https://github.com/sunnydesign "sunnydesign (1 commits)")[![aaronhuisinga](https://avatars.githubusercontent.com/u/2423844?v=4)](https://github.com/aaronhuisinga "aaronhuisinga (1 commits)")[![ZhariffAdam](https://avatars.githubusercontent.com/u/10986512?v=4)](https://github.com/ZhariffAdam "ZhariffAdam (1 commits)")[![amarnik](https://avatars.githubusercontent.com/u/1010830?v=4)](https://github.com/amarnik "amarnik (1 commits)")[![danilopinotti](https://avatars.githubusercontent.com/u/11338999?v=4)](https://github.com/danilopinotti "danilopinotti (1 commits)")[![gjnvro](https://avatars.githubusercontent.com/u/79240437?v=4)](https://github.com/gjnvro "gjnvro (1 commits)")[![jefersondornellescomerc](https://avatars.githubusercontent.com/u/244704974?v=4)](https://github.com/jefersondornellescomerc "jefersondornellescomerc (1 commits)")[![joshkautz](https://avatars.githubusercontent.com/u/17554471?v=4)](https://github.com/joshkautz "joshkautz (1 commits)")

---

Tags

api-authenticationauthenticationauthentication-middlewareaws-cognitoaws-sdkcognitocognito-pooldevice-authenticationfido2google-authenticatorjwtlaravellaravel-cognitolaravel-packagemfapasskeyspasswordlessphpuser-poolphpjwtlaravelawsauthAuthenticationemailpasswordJSON Web Token2faTwo Factor AuthenticationphonesmsoauthfidoFIDO2webauthnCognitoupdateMFAPasswordlesspasskeyMulti Factor Authenticationemail-verificationemail confirmationforgotresetchangesms verificationEmail confirmphone verificationemail tokenuser poolellaisyssms codePhone codephone confirmationsms confirmationemail codephone tokensms tokenemail recoveryphone recoverysms recoveryemail resetphone resetsms resetemail forgotphone forgotsms forgotsms updatephone confirmsms confirmforgot passwordaws-sdkjwt-tokenchange passwordaws-sdk-phpAWS Cognitoupdate passwordverify-codesrp protocolsecure remote password protocolconfirm codetoken verifyidentity pooldevice authentication

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ellaisys-aws-cognito/health.svg)

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

###  Alternatives

[benbjurstrom/cognito-jwt-guard

A laravel auth guard for JSON Web Tokens issued by Amazon AWS Cognito

1113.1k](/packages/benbjurstrom-cognito-jwt-guard)[kinde-oss/kinde-auth-php

Kinde PHP SDK for authentication

2293.1k3](/packages/kinde-oss-kinde-auth-php)

PHPackages © 2026

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