summaryrefslogtreecommitdiff
path: root/server/utils/otp.js
blob: 244315f5f9b86b8f589ef5aa79de83683393be28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import {
  ONE_FIVE_TIMES_ZERO,
  NINE_FIVE_TIMES_ZERO,
} from "../constants/numbers.js";

const generateOTP = () => {
  const otp = Math.floor(
    ONE_FIVE_TIMES_ZERO + Math.random() * NINE_FIVE_TIMES_ZERO
  );
  return otp;
};

export default generateOTP;