aws-cognito

Laravel Authentication using AWS Cognito - Web and API

Laravel Authentication using AWS Cognito

[!NOTE] Last Updated: 2026-07-31

Release Version  Release Date  Total Downloads 

GitHub Stars  GitHub Forks  GitHub Contributors  APM

Quality Gate Status  Security Rating  Maintainability Rating

Contents

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 & 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 is available on the GitHub and can be used as a reference for your own application.

Compatibility

PHP Support
Laravel Support
|Version|Support| |-|-| |7.4|Yes :heavy_check_mark:| |8.0|Yes :heavy_check_mark:| |8.1|Yes :heavy_check_mark:| |8.2|Yes :heavy_check_mark:| |8.3|NA | |8.4|NA | |Version|Support| |-|-| |7.x|Yes :heavy_check_mark:| |8.x|Yes :heavy_check_mark:| |9.x|Yes :heavy_check_mark:| |10.x|Yes :heavy_check_mark:| |11.x|Yes :heavy_check_mark:| |12.x|Yes :heavy_check_mark:| |13.x|NA|

Features

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

Installation

This package is available via Packagist and can be installed using composer.

composer require ellaisys/aws-cognito

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

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

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.

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

Roadmap

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

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:

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

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  GitHub repo Good Issues for newbies  GitHub Help Wanted issues
GitHub repo PRs  GitHub repo Merged PRs  GitHub Help Wanted PRs

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:

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

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 file. Please review the license before using, modifying, or redistributing this software.

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).