Skip to content

Instantly share code, notes, and snippets.

@pH-7
Last active June 9, 2024 02:06
Show Gist options
  • Save pH-7/b3671db8da6baddffe6af002ab92a7ea to your computer and use it in GitHub Desktop.
Save pH-7/b3671db8da6baddffe6af002ab92a7ea to your computer and use it in GitHub Desktop.
Generate a One-Tine Password / One-Time Code unique 6-digit code
// generate a unique 6-digit OTP code
const generateOntTimeCode = () => Math.floor(Math.random() * 900000) + 100000;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment