I am first time experiencing socketio Admin UI. I am facing an issue, I m not abale to view all feature in dashboard. when i visit on https://admin.socket.io/#/
and after successfully login it just shows following menu.
here is my connection snippet.
const app = express();
const http = require('http');
const { instrument } = require("@socket.io/admin-ui");
const server = http.createServer(app);
var io = require("socket.io")(server, {
cors: {
origin: ["https://admin.socket.io"],
credentials: true,
},
});
instrument(io, {
auth: false
});
I want that all feature as shown in that menu.
- Sockets
- Rooms
- Clients
- Events
CodePudding user response:
It looks like the issue might be related to the auth option you are passing to the instrument function. By setting auth: false, you are disabling authentication for the Socket.io admin UI, which could be why you are only seeing a limited set of features in the dashboard.
If you want to enable authentication and see all the features, you can pass auth: true and configure your own authentication function by passing authenticate: function(socket, next) in the options object.
CodePudding user response:
I found the answer. Actually default mode is development but somehow it was not set when i set the mode to development it works fine for me.
const app = express();
const http = require('http');
const { instrument } = require("@socket.io/admin-ui");
const server = http.createServer(app);
var io = require("socket.io")(server, {
cors: {
origin: ["https://admin.socket.io"],
credentials: true,
},
});
instrument(io, {
auth: false,
mode: "development"
});