You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Session Expires in AdminJS with Node.js Clustering Using express-session #1772
When using AdminJS in a Node.js application with the cluster module, logging into the AdminJS panel (/admin) is successful, but after login, its showing alert message "session expired" error and a redirection to /admin/login. This issue occurs only in a clustered environment and not when running a single process.
To Reproduce
Set up a Node.js application with clustering, using @adminjs/express, express-session.
Configure AdminJS with buildAuthenticatedRouter and a MongoDB database adapter.
Start the server with multiple workers (e.g., node run.js).
Access http://localhost:9090/admin, log in with valid credentials.
Observe the "session expired" error and redirection to /admin/login.
Expected Behavior
The session should persist across requests in all cluster workers, allowing uninterrupted access to AdminJS resources after login.
Actual Behavior
After a successful login, navigating to resources or refreshing the page triggers a "session expired" error and a 302 redirect to /admin/login.
Activity
dziraf commentedon Jul 8, 2025
You use
express-sessionbut do you use a session store? Otherwise the session is saved in the memory and it's expected behaviour