Skip to content

Commit 1d8ca86

Browse files
committed
rename env to resue ELIZA_SERVER_AUTH_TOKEN
1 parent 0c36515 commit 1d8ca86

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/server/src/__tests__/socketio-router.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ describe('SocketIORouter', () => {
116116
});
117117
});
118118

119-
describe.only('when ELIZA_SOCKETIO_AUTO_TOKEN is set', () => {
119+
describe.only('when ELIZA_SERVER_AUTH_TOKEN is set', () => {
120120
const validToken = 'test-auth-token-12345';
121121

122122
beforeEach(() => {
123-
process.env.ELIZA_SOCKETIO_AUTH_TOKEN = validToken;
123+
process.env.ELIZA_SERVER_AUTH_TOKEN = validToken;
124124
});
125125

126126
it('should not allow connection with invalid auth token', () => {

packages/server/src/socketio/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class SocketIORouter {
4141
logger.info(`[SocketIO] New connection: ${socket.id}`);
4242

4343
// Optional Authentication
44-
const serverAuthToken = process.env.ELIZA_SOCKETIO_AUTH_TOKEN;
44+
const serverAuthToken = process.env.ELIZA_SERVER_AUTH_TOKEN;
4545
if (serverAuthToken) {
4646
if (socket.handshake.auth.token !== serverAuthToken) {
4747
logger.error(`[SocketIO] Invalid authentication token for socket ${socket.id}`);
@@ -50,7 +50,7 @@ export class SocketIORouter {
5050
}
5151
} else {
5252
logger.warn(
53-
'[SocketIO] Server authentication is disabled. Set ELIZA_SOCKETIO_AUTH_TOKEN environment variable to enable.'
53+
'[SocketIO] Server authentication is disabled. Set ELIZA_SERVER_AUTH_TOKEN environment variable to enable.'
5454
);
5555
}
5656

0 commit comments

Comments
 (0)