Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Ajax Fos User Bundle

Ajax Fos User Bundle Laravel Package

tecnocreaciones/ajax-fos-user-bundle

Tecnocreaciones AjaxFOSUserBundle is a Symfony bundle that adds AJAX support to FOSUserBundle, enabling asynchronous user registration, login, and profile actions without full page reloads. It provides routes, controllers, and templates for smoother user flows.

View on GitHub
Deep Wiki
Context7

AJAX FOS User Bundle adds AJAX-powered user interactions to FOSUserBundle in Symfony applications. It provides lightweight controllers, forms, and JavaScript hooks for submitting authentication and registration forms without full page reloads while preserving Symfony validation and security.

  • AJAX login and registration flows
  • Seamless FOSUserBundle integration
  • Configurable endpoints and templates
  • Inline validation and error feedback
  • Minimal setup for existing Symfony projects
Frequently asked questions about Ajax Fos User Bundle
Can I use tecnocreaciones/ajax-fos-user-bundle in a Laravel application?
No. Despite appearing in Composer package searches alongside Laravel libraries, this is a Symfony bundle built on FOSUserBundle and Symfony's security and event-dispatcher components. It has no Laravel service provider, no facade, and no compatible dependency graph, so it cannot be installed into a Laravel app without Composer conflicts. If you need AJAX login in Laravel, use Laravel Fortify, Breeze, or a simple JSON-returning controller with the framework's own session guard.
What does this package actually do?
It is a thin configuration and event-listener layer that adapts FOSUserBundle's form login, registration, and profile flows to accept AJAX or JSON submissions. Instead of returning HTML redirects, it returns JSON success or failure payloads so a same-origin JavaScript layer can update the page without a reload. It does not add token-based or API authentication; the underlying Symfony session and CSRF semantics still apply.
Which Symfony versions does ajax-fos-user-bundle support?
Realistically Symfony 2.x and 3.x, with the last release dating to March 2017. Its listeners hook into FOSUserBundle and security internals that were replaced when Symfony moved from Guard to the new Authenticator system. On Symfony 5, 6, or 7, the Composer constraint set will not resolve and the code paths no longer exist.
How do I install and configure it with FOSUserBundle?
You would add the package via Composer into an existing Symfony 2 or 3 project that already has FOSUserBundle installed and configured. Then you enable the bundle in your kernel, register its routing, and let your login and registration templates post via XHR so the listeners can return JSON. Because the repository ships an empty README, expect to read the listener classes directly to work out the exact routes and response shape.
Does this package provide JWT or stateless API authentication?
No. It only changes the response format of FOSUserBundle's form-login flow from HTML redirects to JSON, while the session cookie and CSRF token remain required. For stateless API auth on Symfony, use LexikJWTAuthenticationBundle, the native json_login authenticator, or an OIDC provider. For Laravel, use Sanctum or Passport.
Is FOSUserBundle still maintained, and what does that mean for this bundle?
No. FOSUserBundle is end-of-life and has been superseded by Symfony's native security-bundle authenticators. Since this package is only a thin layer on top of FOSUserBundle, its useful life is bounded by that dependency. Adopting both today means taking on two unmaintained components in the most security-sensitive part of your application.
What are the alternatives if I just want AJAX login without a page reload?
On modern Symfony, the built-in json_login authenticator handles this in roughly twenty lines of security configuration with no third-party dependency. On Laravel, Fortify or a small custom controller returning JSON achieves the same result. Both options are first-party, actively maintained, and give you a clear patch path for security issues.
Is this package safe to use in production given its maintenance status?
It carries high risk: the last release was in March 2017, there are roughly nine GitHub stars and zero dependents, and there is no maintainer to notify about vulnerabilities. Authentication code is exactly where 'it still works today' is not sufficient assurance, because there is no upstream patch path. If you must keep it alive in a frozen legacy app, vendor it, pin the version, and record it as owned technical debt.
How would I test AJAX login and registration with this bundle?
Because replies are JSON rather than redirects, you would assert on status codes and response bodies instead of following redirects. Functional tests need to send the CSRF token and carry the session cookie across requests, which usually means bootstrapping the client with the login page first. Expect to write these tests yourself, since the repository provides no test suite to inherit.
Should I adopt this bundle or just read it as a reference?
The recommended path is to read it briefly as a reference implementation and then reimplement the equivalent with native Symfony json_login, or with Laravel's own auth tooling if you are on Laravel. Its JSON response shape and failure-handling pattern are the genuinely reusable parts. The only defensible adoption case is a frozen Symfony 2 or 3 application with no upgrade budget, and even then it should be vendored and tracked as debt.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console