summaryrefslogtreecommitdiff
path: root/server/utils/otp.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/utils/otp.js')
-rw-r--r--server/utils/otp.js8
1 files changed, 8 insertions, 0 deletions
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;