From c245a32a5137105e28695ae08960a4f4d1ec263f Mon Sep 17 00:00:00 2001 From: Vikas Kannurpatti Jayaram Date: Sat, 2 May 2020 12:16:45 +1000 Subject: [PATCH] add `send-phone-message` treggerId for MFA SMS hook. (#93) --- src/auth0/handlers/hooks.js | 2 +- tests/auth0/handlers/hooks.tests.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/auth0/handlers/hooks.js b/src/auth0/handlers/hooks.js index 6a6f0ad..54cef8f 100644 --- a/src/auth0/handlers/hooks.js +++ b/src/auth0/handlers/hooks.js @@ -1,7 +1,7 @@ import DefaultHandler from './default'; import constants from '../../constants'; -const ALLOWED_TRIGGER_IDS = [ 'credentials-exchange', 'pre-user-registration', 'post-user-registration', 'post-change-password' ]; +const ALLOWED_TRIGGER_IDS = [ 'credentials-exchange', 'pre-user-registration', 'post-user-registration', 'post-change-password', 'send-phone-message' ]; export const excludeSchema = { type: 'array', diff --git a/tests/auth0/handlers/hooks.tests.js b/tests/auth0/handlers/hooks.tests.js index 258fd04..f25b664 100644 --- a/tests/auth0/handlers/hooks.tests.js +++ b/tests/auth0/handlers/hooks.tests.js @@ -130,6 +130,12 @@ describe('#hooks handler', () => { code: 'code', active: false, triggerId: 'post-change-password' + }, + { + name: 'Hook-7', + code: 'code', + active: false, + triggerId: 'send-phone-message' } ];