Add basic auth
The dashboard has no built-in auth. Don't expose it on the open internet without one. Here's the minimum per framework.
Express + Passport
From examples/with-express-auth.
Run it:
Fastify + @fastify/basic-auth
From examples/with-fastify-auth.
The onRequest hook covers every route registered after it. Scope the auth plugin inside a child context if you want it to cover only the dashboard.
Hapi + strategy
From examples/with-hapi-auth.
The plugin options pass straight to Hapi's route config, so the auth strategy applies to every bull-board route.
NestJS + guards
From examples/with-nestjs-fastify-auth.
NestJS on the Fastify platform with a standard @UseGuards() guard. The example uses passport-local plus @fastify/secure-session for session cookies.
The dashboard is mounted by @bull-board/nestjs, and the module's own guard checks the session before the route resolves.
Combine with read-only mode
Auth keeps strangers out. Read-only mode keeps authenticated users from running destructive actions. Use both for public-facing status boards.