{"_id":"@apostrophecms/login-totp-stable","name":"@apostrophecms/login-totp-stable","dist-tags":{"latest":"1.3.3"},"versions":{"1.3.3":{"name":"@apostrophecms/login-totp-stable","version":"1.3.3","description":"Adds totp (time-based one-time password) to Apostrophe login pages","main":"index.js","scripts":{"lint":"npm run eslint && npm run stylelint","eslint":"eslint --ext .js,.vue .","stylelint":"stylelint ui/**/*.{scss,vue}","test":"npm run lint && mocha"},"repository":{"type":"git","url":"git+https://github.com/apostrophecms/apostrophe.git","directory":"packages/login-totp"},"homepage":"https://github.com/apostrophecms/apostrophe/tree/main/packages/login-totp#readme","keywords":["apostrophe","login","totp"],"author":{"name":"Apostrophe Technologies"},"license":"MIT","bugs":{"url":"https://github.com/apostrophecms/login-totp/issues"},"devDependencies":{"apostrophe":"workspace:^","eslint":"^9.39.1","eslint-config-apostrophe":"workspace:^","mocha":"^11.7.5","stylelint":"^16.0.0","stylelint-config-apostrophe":"workspace:^"},"dependencies":{"qrcode":"^1.5.0","thirty-two":"^1.0.2","totp-generator":"0.0.13"},"gitHead":"b3e29f004f514041e1e389293ae67017c60d006e","_id":"@apostrophecms/login-totp-stable@1.3.3","_nodeVersion":"24.10.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-bD+M/OGlcBNQrHW+471UrLDw0Jrn43FEV4uSQHDY1qzUFree7GYdTmVCQgPaxUSgHzdKmuBCfWPHu/eqR407dQ==","shasum":"b9fce7c9cca8d46b0881f6b419100ffdbba3b5b6","tarball":"https://registry.npmjs.org/@apostrophecms/login-totp-stable/-/login-totp-stable-1.3.3.tgz","fileCount":21,"unpackedSize":33944,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDJ6tnqLVnEi7aQFdi6MTeZ1Qri7LUYS94UoYJMBsIViAiAtwBYBeTY3S82so2cHpfULCsSWEEuyHGiKP66F1vr6Pw=="}]},"_npmUser":{"name":"boutell","email":"tom@apostrophecms.com"},"directories":{},"maintainers":[{"name":"alexgilbert","email":"alex@apostrophecms.com"},{"name":"boutell","email":"tom@apostrophecms.com"},{"name":"romanek","email":"stuart+npm@apostrophecms.com"},{"name":"bodonkey","email":"robert.means1969+apostrophecms@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/login-totp-stable_1.3.3_1781112800833_0.2621320638068585"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-10T17:33:20.637Z","1.3.3":"2026-06-10T17:33:20.968Z","modified":"2026-06-10T17:33:21.273Z"},"maintainers":[{"name":"alexgilbert","email":"alex@apostrophecms.com"},{"name":"boutell","email":"tom@apostrophecms.com"},{"name":"romanek","email":"stuart+npm@apostrophecms.com"},{"name":"bodonkey","email":"robert.means1969+apostrophecms@gmail.com"}],"description":"Adds totp (time-based one-time password) to Apostrophe login pages","homepage":"https://github.com/apostrophecms/apostrophe/tree/main/packages/login-totp#readme","keywords":["apostrophe","login","totp"],"repository":{"type":"git","url":"git+https://github.com/apostrophecms/apostrophe.git","directory":"packages/login-totp"},"author":{"name":"Apostrophe Technologies"},"bugs":{"url":"https://github.com/apostrophecms/login-totp/issues"},"license":"MIT","readme":"<div align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/apostrophecms/apostrophe/main/logo.svg\" alt=\"ApostropheCMS logo\" width=\"80\" height=\"80\">\n\n  <h1>Apostrophe TOTP Login Verification</h1>\n  <p>\n    <a aria-label=\"Apostrophe logo\" href=\"https://v3.docs.apostrophecms.org\">\n      <img src=\"https://img.shields.io/badge/MADE%20FOR%20ApostropheCMS-000000.svg?style=for-the-badge&logo=Apostrophe&labelColor=6516dd\">\n    </a>\n    <a aria-label=\"Test status\" href=\"https://github.com/apostrophecms/login-totp/actions\">\n      <img alt=\"GitHub Workflow Status (branch)\" src=\"https://img.shields.io/github/workflow/status/apostrophecms/login-totp/Tests/main?label=Tests&labelColor=000000&style=for-the-badge\">\n    </a>\n    <a aria-label=\"Join the community on Discord\" href=\"http://chat.apostrophecms.org\">\n      <img alt=\"\" src=\"https://img.shields.io/discord/517772094482677790?color=5865f2&label=Join%20the%20Discord&logo=discord&logoColor=fff&labelColor=000&style=for-the-badge&logoWidth=20\">\n    </a>\n    <a aria-label=\"License\" href=\"https://github.com/apostrophecms/login-totp/blob/main/LICENSE.md\">\n      <img alt=\"\" src=\"https://img.shields.io/static/v1?style=for-the-badge&labelColor=000000&label=License&message=MIT&color=3DA639\">\n    </a>\n  </p>\n</div>\n\nThis login verification module adds a [TOTP (Time-based One-Time Password)](https://en.wikipedia.org/wiki/Time-based_one-time_password) check when any user logs into the site, compatible with Google Authenticator or any TOTP app.\nWhen activated, it will ask unregistered users to add a token to their app through a QR code. Once done, it will ask users to enter the code provided by their app after the initial login step.\n\n## Installation\n\nTo install the module, use the command line to run this command in an Apostrophe project's root directory:\n\n```\nnpm install @apostrophecms/login-totp\n```\n\n## Usage\n\nInstantiate the TOTP login module in the `app.js` file:\n\n```javascript\nrequire('apostrophe')({\n  shortName: 'my-project',\n  modules: {\n    '@apostrophecms/login-totp': {}\n  }\n});\n```\n\nYou must configure the `@apostrophecms/login` module with a TOTP secret, as shown. The secret must be **exactly 10 characters long.**\n\n```javascript\n// modules/@apostrophecms/login/index.js\nmodule.exports = {\n  options: {\n    totp: {\n      // Should be a random string, exactly 10 characters long\n      secret: 'totpsecret'\n    }\n  }\n};\n```\n\n> ⚠️ All configuration of TOTP related options is done on the `@apostrophecms/login` module. The `@apostrophecms/login-totp` module is just an \"improvement\" to that module, so it has no configuration options of its own.\n\n### Resetting TOTP when a user loses their device\n\nIf a user loses their device, an admin can edit the appropriate user via the admin bar. Select \"Yes\" for the \"Reset TOTP\" field and save the user.\n\nIf an admin user loses their own device, they can reset TOTP via a command line task. Pass the username as the sole argument:\n\n```\nnode app @apostrophecms/user:reset-totp username-goes-here\n```\n\nOnce TOTP is reset, the user is able to set it up again on their next login.\n","readmeFilename":"README.md","_rev":"1-a1090077b94e7539ff5c816dd1b5c7a8"}