{"_id":"otp-without-db","_rev":"9-1afcee815933e30620f265a209ee5585","name":"otp-without-db","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"otp-without-db","version":"1.0.0","keywords":["otp","sms","verification","cryptography","smsverify","emailverify","2fa"],"author":{"url":"me@anam.co","name":"Anam Ahmed"},"license":"MIT","_id":"otp-without-db@1.0.0","maintainers":[{"name":"theanam","email":"me@anam.co"}],"homepage":"https://github.com/theanam/otp-without-db#readme","bugs":{"url":"https://github.com/theanam/otp-without-db/issues"},"dist":{"shasum":"858027cfa7bef54ef8da9bbcb14c3189c943ba88","tarball":"https://registry.npmjs.org/otp-without-db/-/otp-without-db-1.0.0.tgz","fileCount":4,"integrity":"sha512-aW23vmkeCWclK378khVN8FAy1Q2hfoFrdWlF4DQ7A01GPELbmMnyDv6xLXmKsOiLm/XDgA5L3vkTaCKsNszPxg==","signatures":[{"sig":"MEQCIFHMF9HBAd4bePne1v/AS6UULs0qQ8LENyU0YfKbyj7vAiBgjNa/IxrhGighXo8BphmfexHPRMt9c35ULe3YeMh6ZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlcT3CRA9TVsSAnZWagAAwhsP/i+ol+i710K63B6jgp5w\nUPKtRsjDNoMl7Rq5os76UZXYr8fvGITVDjAzhpsq2oKyzRgLLjypeYvqheT2\npUzwmBBRa5dtm3Ka9B3xfpytxiQBVfpDfOQSDuHMqqVJvkjkVolFzmySOreh\nY9TYroZXi2F+q3FLwXMmxPORa6ay8roCcwPWjtm3a/X5Xja2FdE+YGT4NPlm\n679uFzev1hfp7IULjLRV4BBlTCnfegXQUbJzTEl+x6Qn98wDPN7D0pU61Zlv\nS277Yb+9QAMzRmTrx7eyqwPpAcdWEQ8XF8S6gOSY3BUXHSxItLxJCTZ/wNU1\nVoMCzOtyeMnppKIPhTvBX6DRSDUaUktv3UkJriHjGRcRmNuCUWEKCR5sfUGq\n1oILrVx/4gKqboTg+QpzWzxQcBABsMisWaMxVw4epHx+oqkhGlawD7vK9gso\nYIilH+1NBbMRxjoylSQwycytpb3VUg2QQjjdYeiTmIm2221bU4ExmMRV7eFZ\nz7xQfH8d2Mu9XKIC0zqMpU2LMqFRMdnhVeHwS32vkupB327ozNv9+rvUHiZx\nQDaeHrYcn2H9d69jwGl9qRGL+Ypb3qnYFHehUvuFLSCrk4oJs6ROYs08XKTF\n5Y19AX6Jn/7FDM7D92Hte3pQ09v1bTFQG3Q+7v5JrRDGUvKqavj9avEAf72L\ncxHf\r\n=OJUq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"106e0411732cdb1e0d990f39c7cba9c86fe86ffb","scripts":{"test":"node test.js"},"_npmUser":{"name":"theanam","email":"me@anam.co"},"repository":{"url":"git://git@github.com/theanam/otp-without-db.git","type":"git"},"_npmVersion":"6.5.0","description":"OTP verification with only cryptography and no database","directories":{},"_nodeVersion":"10.15.3","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/otp-without-db_1.0.0_1570096375115_0.7623001075661675","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"otp-without-db","version":"1.0.1","keywords":["otp","sms","verification","cryptography","smsverify","emailverify","2fa"],"author":{"url":"me@anam.co","name":"Anam Ahmed"},"license":"MIT","_id":"otp-without-db@1.0.1","maintainers":[{"name":"theanam","email":"me@anam.co"}],"homepage":"https://github.com/theanam/otp-without-db#readme","bugs":{"url":"https://github.com/theanam/otp-without-db/issues"},"dist":{"shasum":"636a75b6608ee39abef0d9c63186b17e0dde3d80","tarball":"https://registry.npmjs.org/otp-without-db/-/otp-without-db-1.0.1.tgz","fileCount":4,"integrity":"sha512-mzR0Q3LxNljAYkwaXGgB9byuxa7n6cZgKyMLJv6605ldgDcV4O5FGkA2ao1WH4G/MTKByfb9X5XvFGQyNYPMRw==","signatures":[{"sig":"MEQCIANGv3700I4gUM9vhAc/OtekeqmYL7y/Fi1WhNVSn7zOAiBddreoqGFlH7glan3GLa4ShzJYvVCPqJWKpTEGF14Atg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6391,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmG9KCRA9TVsSAnZWagAAz84QAIHqpR8xbuZAEkgpELHV\n9hhA/mVdh/SuybJwNE4cjKPIrg6PZs0tYGuAbKVxvHCPFbs9dJ4axnCqGZ0t\nusuvXFFnQflnhlFyRJrbHmoEKWcci4eZNjGxmrAqYVmbLgGIFndAsTbkQ9fW\nTNNNGxjLnIbgaDa6R8GDXhaOV0uTDNVhYqWbRFYEk8FH4ZhRFbC8G1nfnddJ\ntQrGs+LinN7x6Hx8IMVsVQLev3vfC16SNcIZ2QNCSDUupqIyGbHl4CD85LzB\nPxA1+pORf9h8c7v0ep8VQeFHZo+4WstX70npJ4zc37S86qDensW+7qiP7xmw\nUengdiZUN3b6YxttWCzc+bVIFERgwpfroTHZVmUdCEMdf0jZwYfxIiZ1z4Hl\ngW+m9LW5fpKITneZEJy8m3VepYI3Xc10yd15d7DeATrTB8DbSK26OM3Gn+nS\nVPea65RR2cgRHgtnBdGYP2xaMKGH6aIr9bu+zekQZpu8Muo+2QcLWnR5teq6\n8Tx7YcGX+FryTxpcayl4Id5qERI+KJso6QCpvViv2QKwjxXXlp3Uz3zqEGBb\nbIWgOdJvzhPwlhy5NQR+wiq1lD+fbO3MnT1lXeRnajpk2uv3I9e9YYDTB4sz\n7zwKgIkFVXkOsYwogK3ZK7B2+fPkhTXiL1cifCknRYtMqV2IUzykIf1p4DjV\nHkGf\r\n=F1Gd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"c52cb49c03e12d41575965bae4c59edc74b3bf68","scripts":{"test":"node test.js"},"_npmUser":{"name":"theanam","email":"me@anam.co"},"repository":{"url":"git://git@github.com/theanam/otp-without-db.git","type":"git"},"_npmVersion":"6.11.3","description":"Database less verification with cryptography","directories":{},"_nodeVersion":"12.11.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/otp-without-db_1.0.1_1570271049655_0.5317938984255366","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"otp-without-db","version":"1.0.2","keywords":["otp","sms","verification","cryptography","smsverify","emailverify","2fa"],"author":{"url":"me@anam.co","name":"Anam Ahmed"},"license":"MIT","_id":"otp-without-db@1.0.2","maintainers":[{"name":"theanam","email":"me@anam.co"}],"homepage":"https://github.com/theanam/otp-without-db#readme","bugs":{"url":"https://github.com/theanam/otp-without-db/issues"},"dist":{"shasum":"4e73477ad0683936203418fa7efc0f4839ce07a2","tarball":"https://registry.npmjs.org/otp-without-db/-/otp-without-db-1.0.2.tgz","fileCount":4,"integrity":"sha512-6maTYV1XZg5BagPJQ3A5VncJVhgZpU25pGo1okD1yYWUrrGPAfdlI4b5bwEoHoz8eCWz5ejyQiaLPs6qyPQkvw==","signatures":[{"sig":"MEYCIQDPEwnjNDOSp1ab8RWIGjoNAl8xylTsEayCHC92z9ZGJQIhAJNjWWrV7wEP06MJ4vFB8o2yrUyn7b9RPpytw8R+b1tc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmPTLCRA9TVsSAnZWagAAouQP/iWg+idXnAmxqzjYncA/\nUF723Nac9CplTFHmS+xSTxEiAg8AVdkBnEoWL4Y9NH21IGMbW+en+JOXCCPg\n2GO/bLPkJHY8dwKa2B8hZj/DlCsrAei7lU/45Chhv2jMYgqq2DqaLXHzlfAH\nDoDUMdo2exw/5uyvyzfJAwwVyBFBNsQcvokAOqD7maaa5C0eblECcBowcKjP\n9LfaYHh3ldYc21UuC6paNXS09+s5BxI6JJFlFjmz/ktx9riG9wb49uVFbjya\nLpcfDOSmgKAqlm7+5Cua7nj0VmCRG1M69b7mqo6DpdgFCRMH1Mdoj9+3JTjc\nrTR+IfGd8Sv9w5pjEenIaH5lc6YJ7rjJGbt+4WpeWV319yeeY2RmQ8GrW592\ntRZFETRIkuot5t94J5YjDKBEHUITSFiU3ifBt6IDD7/PA11VCK7n1oCNttv1\nNyRJ6qhOWkw/D9StRU1s1wf4Y6FTITJ7IkL/0XjqGXaG5eb8ey6qJttPIKEg\nYb1H4/9s+laA0rNNTEmYjJd+zNWpqhMcEq98yXOqi+msSmVN/sY4VMYJAjFc\ngxsJp6nh2015BvzbWHe85A+w5Byyoji4jr36bDUHf1y8KVrbxvVSaL+6hYko\nWcvuG0pqv946Sl2uLdQR0iCZomKKeRI9BbYsQEowY9lY9SB/11mGEtzf1a4v\nYCnw\r\n=ujyu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"4834a10b2756a7ded0ec129a99bd4c4755660d7e","scripts":{"test":"node test.js"},"_npmUser":{"name":"theanam","email":"me@anam.co"},"repository":{"url":"git://git@github.com/theanam/otp-without-db.git","type":"git"},"_npmVersion":"6.5.0","description":"Database less verification with cryptography","directories":{},"_nodeVersion":"10.15.3","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/otp-without-db_1.0.2_1570305226436_0.9348440258369826","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"otp-without-db","version":"1.0.3","keywords":["otp","sms","verification","cryptography","smsverify","emailverify","2fa"],"author":{"name":"Anam Ahmed","email":"me@anam.co"},"license":"MIT","_id":"otp-without-db@1.0.3","maintainers":[{"name":"theanam","email":"me@anam.co"}],"homepage":"https://github.com/theanam/otp-without-db#readme","bugs":{"url":"https://github.com/theanam/otp-without-db/issues"},"dist":{"shasum":"d1d0f1feaa73167d272c9f808576f3c47cafd3b2","tarball":"https://registry.npmjs.org/otp-without-db/-/otp-without-db-1.0.3.tgz","fileCount":4,"integrity":"sha512-a43DgUERSXKA/Q+MXD+1XZWRIQ9E7VpGgS1+ryTGHU9X3sSZcXNP93N7Bc4rCpvH+321bqa2y41xuPzqIjKl2Q==","signatures":[{"sig":"MEYCIQDAh+RaUOS2T8uGseF0vnrozzghYPi2t6yzvBE3/TilyAIhAJgZT9pNJrKJwADvZF3eTKLjedI6Fr6BtZDWCVyXYPey","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsXLRCRA9TVsSAnZWagAALNAQAKNeoW06X9loO536eBol\nwKdDtbDSPIsTneJweJayiZtgTa58qUTABV/49iuw4aO/Quy36626nOYpmRqh\nDd1roj0ziOTXJ06u2uBuDpfvcnXjpYq8ma2DYx20y3drZOGpBBfRMEl1FC4F\n7f8mn7pL93xQW0Ae44d41KLnAiRI0MLevQYJKtzDFr9XDeaGpozG6oQLcHrD\n4iZFxBJmS3uvSEgI7te6MbM3rbcTcyT1EAOiHL4IasRJY4kxeCa5LQzP7Nwf\nwiEtSHzbchgU5b0zcO8wOcpEaZ/EtUZJPnbqzzaD6r252KyU5UOmtuZlvR3T\nof8DcuywYLZEpu1VxljBxcZ17F0W/l+jeTiwGqT1CCyTOaMS998fmPKbyn/r\nwJ/722wrqkF+qE0LY6YV/+wcQVkM7tmpXzf/xOI5YJSziAvd5p11P5asv1Jq\nGuooorqdwd+++/9sVkxRGtkWU/P/QkbbMk9NQU8p6CADx612j6Y+p3175Glo\nQ9rgVZgXDJs8SzpTb06LuSGFzTpS3ev6Arn1/79W8zYyZkkKGmaAHpI1I5ZS\n2u+ARajqdhn9h6RAbgfBShXcHPmjNiyTpNO2dzcIPF9M8uE9u0HAb5FoqYuq\nH6uI9t8/clEpqWMTBkyM3hOHC9ITyMvH12FZCudAJydppIe6SjknRzB1wMkZ\n1cVO\r\n=HFWa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"7653d1a77ae55c1238da8801eb6312a90d8688ae","scripts":{"test":"node test.js"},"_npmUser":{"name":"theanam","email":"me@anam.co"},"repository":{"url":"git://git@github.com/theanam/otp-without-db.git","type":"git"},"_npmVersion":"6.5.0","description":"Database less OTP verification with cryptography","directories":{},"_nodeVersion":"10.15.3","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/otp-without-db_1.0.3_1571910353011_0.2238001807090415","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"otp-without-db","version":"1.0.4","keywords":["otp","sms","verification","cryptography","smsverify","emailverify","2fa"],"author":{"name":"Anam Ahmed","email":"me@anam.co"},"license":"MIT","_id":"otp-without-db@1.0.4","maintainers":[{"name":"theanam","email":"me@anam.co"}],"homepage":"https://github.com/theanam/otp-without-db#readme","bugs":{"url":"https://github.com/theanam/otp-without-db/issues"},"dist":{"shasum":"731b67dceece54efb1098c8f7f98490e78151029","tarball":"https://registry.npmjs.org/otp-without-db/-/otp-without-db-1.0.4.tgz","fileCount":5,"integrity":"sha512-KJHH1VyHtgLMcFMknO2PPepKzoVAGd8q/ZTx4zC+sTFNtuw48ufdC8u/v/my6dukZwaKTNwlGLD5hpV25tlWDw==","signatures":[{"sig":"MEYCIQC77CC6aEsSHmY3LUtrMEuhwFGYJ61T6YbTCBMQrOpZiAIhAO0a0OgTrwRnUi3A7TZJEM7sCiPJznvIUNWHggOHdujV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyUrNCRA9TVsSAnZWagAA1gEP/0CDGh7w69+UZlgSwVAY\naWbfUZ6XdXhW/hahbcttbTKrO5KUeuQXIJu0f6zsuQv2pnQDSzRizG56W4ZH\naeARabnBvvuBWfXYEKZwrYEU9wt11Sa0Y+1xqWVs1OUXIKeb3GzdqVddPWrD\nKWqRIpDSZ58/L3xxeh+cmSw6V3ad3FnJuBeFGVEX0c0h3DdmbeC2TikMUd68\nIvAmx2b+NT+Dxe1Di0262UIu6LCy2RmI9Q1+PFdMpZcu+KZy4CIqRGh4MCUH\n+iv+IrSTKVEDDKd7m96neR3oWCS6EJ7E7pPUR9ZXyA/12T/xdsmE1vtiau3h\nqFYXg8TDOKjwqVodAQMVvWcBC56leG3OGzzLJF9hO0Beqt/6hRnRnkmH8t9c\n2lHcGvKzlV8+ji/0gpJxz5Tws+pRL1qbVX42vTOfPr1gCJdE3tTYhSne5Hnw\n/1wEnnf/6kPFGvHhR28a89uzGhtBDQK4EM1Z0rZTUSHLXuYGlcKwB9VPd1Ll\nJw9pjsfoJTRBecaKJZM7NxAxOI5NbL3VhgK2bmTySUdwFdHZiTg9SGbzIBSp\nGux4A0lb5xy5QZEeLpCgk2mg5yO7PdbOvfSf+Ljx/ePQ8D/yVCfOsRyNsbHw\n6tUIACw2XmH5Uypew4kDVoBE4mrQ3pEWIqLG7bhhS7URuC5jCMcvHsY4tjfk\nWe73\r\n=6SG6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"2757983cbfc074d7870dd7d51c25b8e0ed1ee4a6","scripts":{"test":"node test.js"},"_npmUser":{"name":"theanam","email":"me@anam.co"},"repository":{"url":"git://git@github.com/theanam/otp-without-db.git","type":"git"},"_npmVersion":"6.12.0","description":"Database less OTP verification with cryptography","directories":{},"_nodeVersion":"12.13.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/otp-without-db_1.0.4_1573472972836_0.897009675907569","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"otp-without-db","version":"1.0.5","keywords":["otp","sms","verification","cryptography","smsverify","emailverify","2fa"],"author":{"name":"Anam Ahmed","email":"me@anam.co"},"license":"MIT","_id":"otp-without-db@1.0.5","maintainers":[{"name":"theanam","email":"me@anam.co"}],"homepage":"https://github.com/theanam/otp-without-db#readme","bugs":{"url":"https://github.com/theanam/otp-without-db/issues"},"dist":{"shasum":"51c4b169700982b713a996622068dea588b1f837","tarball":"https://registry.npmjs.org/otp-without-db/-/otp-without-db-1.0.5.tgz","fileCount":6,"integrity":"sha512-3D0yZiyJIJBR+mtsqBplNLvOp3H4GR9tNBF/SAbLFDDtBZov3ulGUY5xm2Lbfyw8G1ybIvngc/4+0dGqTdA9jg==","signatures":[{"sig":"MEQCIDqphtNq635ulk9pwFc2wE79eRzGEFILGxZ0YptIsEZHAiASyUAqL5AboTLQv3nlS2fgM2j76+Gwxmi0HMzEQFBItA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8582},"main":"index.js","gitHead":"57663d0831d53045d3def215f815328603080d19","scripts":{"test":"node test.js"},"_npmUser":{"name":"theanam","email":"me@anam.co"},"repository":{"url":"git://git@github.com/theanam/otp-without-db.git","type":"git"},"_npmVersion":"6.14.16","description":"Database less OTP verification with cryptography","directories":{},"_nodeVersion":"12.22.12","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/otp-without-db_1.0.5_1684788840191_0.18968202685641322","host":"s3://npm-registry-packages"}},"1.0.6":{"name":"otp-without-db","version":"1.0.6","keywords":["otp","sms","verification","cryptography","smsverify","emailverify","2fa"],"author":{"name":"Anam Ahmed","email":"me@anam.co"},"license":"MIT","_id":"otp-without-db@1.0.6","maintainers":[{"name":"theanam","email":"me@anam.co"}],"homepage":"https://github.com/theanam/otp-without-db#readme","bugs":{"url":"https://github.com/theanam/otp-without-db/issues"},"dist":{"shasum":"72335080536f31aabf41f77e671b7c7a01a7102d","tarball":"https://registry.npmjs.org/otp-without-db/-/otp-without-db-1.0.6.tgz","fileCount":6,"integrity":"sha512-cPqPj1LYQ0ln7dECALC+pe2WXODskLCrCWVlZSrXVPBCsgjOBBD4mLTkLccTb1zK74QaCHZFnZzcNSk29UnLVw==","signatures":[{"sig":"MEYCIQDC+ymdIIQrAXtIA3K3QVJgo7hW8Ih6z5QLzYsUx1VNOQIhAKNtAbo1cpVcemWdOlgtsZJ1b7VUowsoj3jjgUzvBm0n","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8703},"main":"index.js","gitHead":"d5e55e34a232eb523ef20d6f75826a7b99e3d6f1","scripts":{"test":"node test.js"},"_npmUser":{"name":"theanam","email":"me@anam.co"},"repository":{"url":"git://git@github.com/theanam/otp-without-db.git","type":"git"},"_npmVersion":"6.14.16","description":"Database less OTP verification with cryptography","directories":{},"_nodeVersion":"12.22.12","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/otp-without-db_1.0.6_1700504752330_0.15636802064340727","host":"s3://npm-registry-packages"}},"1.1.0":{"_id":"otp-without-db@1.1.0","bugs":{"url":"https://github.com/theanam/otp-without-db/issues"},"dist":{"shasum":"db1649c070e78a43bd7518478da9e857132ac8ba","tarball":"https://registry.npmjs.org/otp-without-db/-/otp-without-db-1.1.0.tgz","fileCount":6,"integrity":"sha512-pYRiF+Gc1nTgvNS995p0FK5L3tvrWbuFn/nhHgYdnABOCfQItY/K3DlxQ+dTL2JDb4l+Ce/oF8fJLin4uFvhYA==","signatures":[{"sig":"MEUCIQDQgl90UDIXVSYDSv6g1GmQDFTlU5NDGyXWSc3i4sSE0wIgVt3BvK22TgpIutfG4z1dTP32VeL49ci8kouixgs0qHo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDMr/h60yRu3xSpK2LQk61n03ZCfEaXBtGKEN6WyLjmgAIhALxLB7SGpzMITnKSdhKSkVjYJas0HgAlZh7oV9IMuTPP"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/otp-without-db@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":12492},"main":"index.js","name":"otp-without-db","author":{"name":"Anam Ahmed","email":"me@anam.co"},"gitHead":"ea9544808612fdf0cc82d0ba84a52d926443658a","license":"MIT","scripts":{"test":"node test.js"},"version":"1.1.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"66cb77fc-94d6-4842-ad7f-e0e348a9a491"}},"homepage":"https://github.com/theanam/otp-without-db#readme","keywords":["otp","sms","verification","cryptography","smsverify","emailverify","2fa"],"repository":{"url":"git://git@github.com/theanam/otp-without-db.git","type":"git"},"_npmVersion":"12.2.1","description":"Database less OTP verification with cryptography","directories":{},"maintainers":[{"name":"theanam","email":"me@anam.co"}],"_nodeVersion":"24.22.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/otp-without-db_1.1.0_1792624870194_0.7802272449305638"}}},"time":{"created":"2019-10-03T09:52:55.114Z","modified":"2026-10-21T23:21:10.674Z","1.0.0":"2019-10-03T09:52:55.264Z","1.0.1":"2019-10-05T10:24:09.838Z","1.0.2":"2019-10-05T19:53:46.551Z","1.0.3":"2019-10-24T09:45:53.120Z","1.0.4":"2019-11-11T11:49:32.960Z","1.0.5":"2023-05-22T20:54:00.382Z","1.0.6":"2023-11-20T18:25:52.536Z","1.1.0":"2026-10-21T23:21:10.284Z"},"bugs":{"url":"https://github.com/theanam/otp-without-db/issues"},"author":{"name":"Anam Ahmed","email":"me@anam.co"},"license":"MIT","homepage":"https://github.com/theanam/otp-without-db#readme","keywords":["otp","sms","verification","cryptography","smsverify","emailverify","2fa"],"repository":{"url":"git://git@github.com/theanam/otp-without-db.git","type":"git"},"description":"Database less OTP verification with cryptography","maintainers":[{"name":"theanam","email":"me@anam.co"}],"readme":"## OTP verification using Cryptography and without any Database\n\n#### Background\n\nThis module is derived from my blog post on the technique. You can read the [blog post here](https://blog.anam.co/otp-verification-without-using-a-database/) to understand the technique and motivation.\n\n#### Dependencies: \n\nThis module depends on the [Crypto](https://nodejs.org/api/crypto.html) built in module on nodeJS. This is the only dependency and should work in any system that has crypto support (Which is technocally majority of the systems at this moment)\n\nThis module also uses some modern JavaScript features like Template literals, Default arguments and modern object literal. This might be a problem if you are planning to use it with older versions of nodeJS\n\n#### Installation\n\nYou can use npm to install the package with the following code \n\n    npm install --save otp-without-db\n\n#### Usage\n\nYou need additional tool to create OTP, and send SMS. This module only takes care of the verification part. \n\nYou can take a look at the [otp-generator](https://www.npmjs.com/package/otp-generator) module to create OTP for your users.\n\n#### Verification process\n\nOTP verification is done in the following steps:\n\n1. A hash is created with the phone number/email address and then sent to the user. \n\n2. The user also receives the OTP via SMS, email or any other method. \n\n3. The user sends back the hash, OTP and phone/email used in the first request. \n\n4. The server verifies the information and returns true if they match.\n\nHere's a diagram that shows the whole process:\n\n![OTP Verification process](https://blog.anam.co/content/images/2019/10/Untitled-Diagram.jpg)\n\n#### Generating OTP Hash\n\nWe will use the [otp-generator](https://www.npmjs.com/package/otp-generator) tool mentioned previously to create OTP. You can use any other tool or technique.\n\n    const otpGen  = require(\"otp-generator\");\n    const otpTool = require(\"otp-without-db\"); \n    const key     = \"secretKey\"; // Use unique key and keep it secret\n    \n    let phone = \"88017009090\";  \n    let otp   = otpGen.generate(6, { upperCase: false, specialChars: false, alphabets: false });  \n\n    let hash = otpTool.createNewOTP(phone,otp,key);\n\nYou can then send this hash to the user as response. The generate method takes these following arguments (In particular order),\n\n    createNewOTP(phoneOrEmail,otp,key=\"\",expiresAfter=5,algorithm=\"sha256\")\n\n| Argument      | Required | default | Description    | \n| ------------- | -------- | ------- | -------------- |\n| phoneOrEmail  | true     | N/A     | Phone or email |\n| otp           | true     | N/A     | OTP            |\n| key           | false    | \"\"      | unique and secret key for HMAC see: [createHmac](https://nodejs.org/api/crypto.html#crypto_crypto_createhmac_algorithm_key_options)|\n| expiresAfter  | false    | 5       | Expirty in minutes|\n| algorithm     | false    | `sha256`| Algorithm used for hashing the data. Any supported algorithm from OpenSSL|\n\n\n#### Verifying OTP hash\n\nThe user should get the hash from the HTTP request and should get the real OTP via SMS or email.\n\nThen when the user sends back the information, they can be verified with the following code:\n\n    otpTool.verifyOTP(phone,otp,hash,key);\n\nThis method returns a **Boolean**. If the verification is successful, it will return true.\n\nThis method also takes the following arguments in particular order: \n\n    verifyOTP(phone,otp,hash,key=\"\",algorithm=\"sha256\")\n\n\n| Argument      | Required | default | Description    | \n| ------------- | -------- | ------- | -------------- |\n| phoneOrEmail  | true     | N/A     | Phone or email |\n| otp           | true     | N/A     | OTP            |\n| hash          | true     | N/A     | The hash that was returned from the user           |\n| key           | false     | \"\"      | unique and secret key for HMAC see: [createHmac](https://nodejs.org/api/crypto.html#crypto_crypto_createhmac_algorithm_key_options)|\n| algorithm     | false    | `sha256`| Algorithm used for hashing the data. Any supported algorithm from OpenSSL|\n\n\n#### Security notes\n\nThis module is stateless by design. That keeps it simple, but it also means a few protections **must** live in your application, because the library has no memory of what it issued or how many times a hash has been tried.\n\n**Rate limit verification.** Verifying a hash is a single HMAC and is extremely cheap, so an attacker who holds a valid hash can guess OTPs as fast as your API will answer. A 6 digit OTP has one million possibilities. Limit `verifyOTP` calls per phone/email (or per hash) in your API layer, for example with an in-memory counter, Redis, or your web framework's rate limiter, and lock out after a small number of failures. Shorter `expiresAfter` values and longer OTPs also shrink the window.\n\n**Throttle OTP creation.** If you want to stop the same phone/email from requesting a new OTP every second, that has to be tracked by your application too. It cannot be embedded in the hash, because the client can simply discard the old hash and ask again.\n\n**The hash is not a secret from the user, the key is.** The hash, expiry and salt are sent to the user in plain text. That is fine: without the secret `key` nobody can forge a valid hash, and collecting many hashes does not reveal the key. Keep the key private, make it long and random, and rotate it if it leaks.\n\n****** \n\nThis product is created with 🖤 by [Anam Ahmed](https://anam.co), Any improvements and PR is welcome.\n\n","readmeFilename":"readme.MD"}