You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

@dataunions/default-join-server

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dataunions/default-join-server - npm Package Compare versions

Comparing version

to
3.0.2

{
"name": "@dataunions/default-join-server",
"version": "3.0.1",
"version": "3.0.2",
"description": "A join server that extends the base join server by adding app secret validation and Streamr-awareness",

@@ -36,3 +36,3 @@ "author": "Data Union DAO <contact@dataunions.org>",

"@dataunions/client": "3.0.0",
"@dataunions/join-server": "3.0.1",
"@dataunions/join-server": "3.0.2",
"dotenv": "16.0.2",

@@ -39,0 +39,0 @@ "mysql2": "2.3.3",

@@ -0,5 +1,7 @@

const { InvalidRequestError } = require('@dataunions/join-server')
module.exports = (db) => {
return async (address, joinRequest) => {
if (!joinRequest.secret) {
throw new Error(`App secret not provided by ${address}`)
throw new InvalidRequestError(`App secret not provided by ${address}`)
}

@@ -11,5 +13,5 @@

|| secret.chain !== joinRequest.chain) {
throw new Error(`Invalid app secret provided by ${address}`)
throw new InvalidRequestError(`Invalid app secret provided by ${address}`)
}
}
}