diff --git a/examples/crypto-websockets/server/auth/websocket.ts b/examples/crypto-websockets/server/auth/websocket.ts index 89506aa8e..22c7ffff8 100644 --- a/examples/crypto-websockets/server/auth/websocket.ts +++ b/examples/crypto-websockets/server/auth/websocket.ts @@ -10,7 +10,11 @@ export async function serverAuth({ authProps, done }) { console.log("token", authProps.getToken()) console.log("userpass", authProps.getUserPass()) - done(false) + if (authProps.getToken().split(' ')[1] === process.env.TOKEN) { + done(true); + } else { + done(false); + } } export async function clientAuth({ parsedAsyncAPI, serverName }) {