ellaisys/aws-cognito
ellaisys/aws-cognito integrates AWS Cognito user pools with Laravel, offering authentication guards, registration, login, password reset, MFA, email verification, and token handling. Use Cognito as your app's identity provider with less custom code.
composer require ellaisys/aws-cognito and publish the config with php artisan vendor:publish --provider="Ellaisys\Cognito\Providers\CognitoServiceProvider". The published config/aws-cognito.php is the single most important file — it defines the guard, user model overrides, AWS credentials, user pool, client ID/secret, and route behaviour.AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION, AWS_COGNITO_CLIENT_ID, AWS_COGNITO_CLIENT_SECRET, AWS_COGNITO_USER_POOL_ID. A region/pool mismatch is the most common "it just returns 400" cause.auth.php guard is pointed at the Cognito guard the package registers. If your users table differs from the package expectation, override the user model in the config rather than editing vendor code.config/aws-cognito.php, the registered routes (php artisan route:list filtered to the Cognito prefix), and the auth/management traits. The v2.0.9 architecture and flow diagrams in the repo documentation are worth reading before you build custom flows — they map the token lifecycle and management operations more clearly than the prose docs.AWS_COGNITO_* env var, run php artisan config:clear. Stale config cache is the number one cause of "wrong pool" behaviour in local dev.NEW_PASSWORD_REQUIRED, you must carry the session/challenge state between requests. Model this explicitly (cache or signed token) instead of assuming login is a single request/response.aud/client_id and iss match your pool.^2.0 and read the changelog before minor bumps — 2.0.9 itself is additive (tests, docs, diagrams, console coverage) and introduces no breaking changes.How can I help you explore Laravel packages today?