melk/extended-login-bundle
An extended login bundle for PHP applications that builds on standard authentication with configurable sign-in enhancements. It helps developers customize login behavior and add authentication flows with less boilerplate.
Framework mismatch first. melk/extended-login-bundle is a Symfony bundle (Composer type symfony-bundle), not a Laravel package. There is no service provider, no config/ publish tag, and nothing for Laravel's container to boot. If you are in a Laravel codebase, installing it gets you an autoloaded namespace and nothing else — you would be porting the logic (failure counter + captcha gate), not using the package. Read the rest of this as "what a developer would actually do when this lands in a repo."
If you are in a Symfony project:
composer require melk/extended-login-bundle and pin the version — the only release is 2020-07-31.config/bundles.php (Symfony 4/5 Flex era): Melk\ExtendedLoginBundle\MelkExtendedLoginBundle::class => ['all' => true].composer.json constraints before anything else — expect PHP 7.x and symfony/framework-bundle ^3.4|^4.0|^5.0. On PHP 8.1+/Symfony 6 expect Bundle::load() / getContainerExtension() return-type deprecations.Where to look first, in order:
DependencyInjection/Configuration.php — the authoritative config tree. Trust this over the README; 2020-era docs drift fast.Resources/config/services.* — real service IDs and decorator targets.Resources/views/ — the login template it overrides (this is where the captcha field appears).EventListener/ or Security/ — the failure counter. This is the part you will almost certainly patch.First use case: on a form_login firewall, count failed attempts per user/IP and, past a threshold, replace the standard login form with one requiring a captcha — rejecting authentication without a valid captcha response. Wire it against an existing firewall rather than adding a second authenticator.
form_login/json_login. Adding a second authenticator to the same firewall produces confusing ordering and double failure events.CacheItemPoolInterface) — if it falls back to session/filesystem, your "N failures" threshold becomes per-node and per-session, which silently defeats the feature.security/login view through your app's templates/ (or twig.paths) to style the captcha and show a "too many attempts, complete the captcha" message only past the threshold.melk_extended_login: { attempts: 3, ... } — the exact keys come from Configuration.php. Set them in config/packages/*.yaml per environment; keep the threshold low in prod, effectively off in test.json_login and return a machine-readable error ({ "captcha_required": true }) so the client can fetch a captcha and retry. Do not redirect a JSON client to an HTML form.login_check, assert 200 with a captcha field (or 302 back with error), then a good password + valid captcha succeeds. Stub the captcha validator rather than solving an image in tests.login_throttling, decide which one owns the lockout and which owns the captcha prompt. Two counters reacting to the same failure event is a common source of "locked out forever" bugs.RateLimiter::tooManyAttempts() + a captcha validation rule in LoginController) is the correct shape of the fix; do not try to bridge this bundle into Laravel's auth pipeline.security.authentication.failure / UsernamePasswordFormAuthenticationListener will need patching. Budget for it.composer.json for gregwar/captcha (or similar). Those libraries need GD/imagick and often write to the filesystem. Verify the container has the extension and the temp dir is writable — this fails silently-ish at runtime, not install time.LoginFailureEvent listener or throttling, check getSubscribedEvents() priorities in debug:event-dispatcher before assuming your listener sees the increment.bin/console debug:config melk_extended_login — confirms your YAML is reaching the config tree.bin/console debug:container --tag=kernel.event_subscriber | grep -i melk — confirms the listener is registered.bin/console debug:router | grep login — confirms the gate is on the route you think.dump() inside the failure listener to confirm counters increment and where they reset.vendor/. Swap the listener class or template via services.yaml aliasing; if the bundle doesn't expose it as a service you can override, that's your signal to fork rather than patch.login_throttling or the reverse proxy) and MFA for privileged accounts.master and the tag may diverge; composer show -a melk/extended-login-bundle tells you what you actually have.How can I help you explore Laravel packages today?