From 953dd3c954411d92811415cc9be4a7c7d76ab185 Mon Sep 17 00:00:00 2001 From: rohan09-raj Date: Fri, 19 Aug 2022 00:10:29 +0530 Subject: added otp support --- server/utils/otp.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 server/utils/otp.js (limited to 'server/utils') diff --git a/server/utils/otp.js b/server/utils/otp.js new file mode 100644 index 0000000..9a2a0bc --- /dev/null +++ b/server/utils/otp.js @@ -0,0 +1,8 @@ +import {SIX_TIMES_NINE} from '../constants/aadhaar'; + +const generateOTP = () => { + const otp = Math.floor(Math.random() * SIX_TIMES_NINE + 1); + return otp; +}; + +export default generateOTP; -- cgit