diff --git a/config_sample.json b/config_sample.json index 6181fe9..0b3b9e8 100644 --- a/config_sample.json +++ b/config_sample.json @@ -57,6 +57,7 @@ "expireInSec": 2 } }, + "usePinVerification": true, "userPIN": { "size": 4, "attempts": 3 diff --git a/src/routes/userCreation.js b/src/routes/userCreation.js index eeddaad..2de21eb 100644 --- a/src/routes/userCreation.js +++ b/src/routes/userCreation.js @@ -132,6 +132,10 @@ function createUserEndpoint(req, res, next) { } else { var pin = req.headers['x-otp-pin']; + if( config.usePinVerification === false ) { + return createUser(req, body, res, next, user); + } + if (!pin) { debug('no pin number'); phoneMng.createPIN(user.username, phone, function (err, createdPin) {