{"id":26796182,"url":"https://github.com/akanass/rx-otp","last_synced_at":"2025-04-22T19:57:42.988Z","repository":{"id":25589030,"uuid":"29023303","full_name":"akanass/rx-otp","owner":"akanass","description":"HMAC-based (HOTP) and Time-based (TOTP) One-Time Password manager. Works with Google Authenticator for Two-Factor Authentication.","archived":false,"fork":false,"pushed_at":"2023-03-04T03:19:37.000Z","size":556,"stargazers_count":76,"open_issues_count":4,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-19T07:14:32.678Z","etag":null,"topics":["google-authenticator","hotp","observable","otp","qrcode-generator","rxjs7","totp","two-factor-authentication","u2f"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akanass.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-01-09T15:59:42.000Z","updated_at":"2024-11-24T15:41:26.000Z","dependencies_parsed_at":"2023-10-20T16:28:53.527Z","dependency_job_id":null,"html_url":"https://github.com/akanass/rx-otp","commit_stats":{"total_commits":100,"total_committers":2,"mean_commits":50.0,"dds":"0.020000000000000018","last_synced_commit":"31b839499c1e9801798e7210dbc4dc29115315a9"},"previous_names":["njl07/otp.js"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akanass%2Frx-otp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akanass%2Frx-otp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akanass%2Frx-otp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akanass%2Frx-otp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akanass","download_url":"https://codeload.github.com/akanass/rx-otp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250315923,"owners_count":21410473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google-authenticator","hotp","observable","otp","qrcode-generator","rxjs7","totp","two-factor-authentication","u2f"],"created_at":"2025-03-29T18:17:43.136Z","updated_at":"2025-04-22T19:57:42.964Z","avatar_url":"https://github.com/akanass.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# One-Time Password manager\n\nOne Time Password manager is fully compliant with [HOTP](http://tools.ietf.org/html/rfc4226) (counter based one time passwords) and [TOTP](http://tools.ietf.org/html/rfc6238) (time based one time passwords). It can be used in conjunction with the `Google Authenticator`, for Two-Factor Authentication, which has free apps for `iOS`, `Android` and `BlackBerry`.\n\nAll methods described in both `RFC` are implemented in [API](#api).\n\nNow [RxJS](http://reactivex.io/rxjs) compliant, wrote in full [Typescript](https://www.typescriptlang.org/docs/tutorial.html) | [ES6](https://babeljs.io/docs/learn-es2015/) for client and server side.\n\n## Table of contents\n\n* [Installation](#installation)\n* [Super simple to use](#super-simple-to-use)\n* [Build your project with Webpack](#build-your-project-with-webpack)\n* [API in Detail](#api-in-detail)\n* [Contributing](#contributing)\n* [Change History](#change-history)\n* [License](#license)\n\n## Installation\n\n```sh\n$ npm install --save @akanass/rx-otp rxjs\n\nor\n\n$ yarn add @akanass/rx-otp rxjs\n```\n\n## Super simple to use\n\n**RX-OTP** is designed to be the simplest way possible to generate and verify OTP.\n\nIt's fully `Typescript` | `ES6` written, so you can import it :\n\n```typescript\nimport {HOTP} from \"@akanass/rx-otp\";\n```\n\nor use `CommonJS`:\n\n```javascript\nconst HOTP = require('@akanass/rx-otp').HOTP;\n```\n\nNow, it's easy to perform a generation of `HOTP`:\n\n```typescript\nHOTP.generate('12345678901234567890').subscribe({\n    next: token =\u003e console.log(token), // display 125165 in the console\n    error: err =\u003e console.error(err) // show error in console\n});\n```\n\n[Back to top](#table-of-contents)\n\n## Build your project with Webpack\n\nIf you want to include this library inside a project builds with `webpack` for a `client` application, you must add this configuration inside your `webpack configuration`:\n\n```javascript\n{\n    target: \"web\",\n    node: {\n        fs: \"empty\",\n        net: \"empty\",\n        tls: \"empty\"\n    }\n}\n``` \n\nFor a `server` application, `target` will be `node`, `node` block in configuration **doesn't exist** and `uglify` plugin must be `disabled`. \n\n[Back to top](#table-of-contents)\n\n## API in Detail\n\nWe implemented some functions and to see their details go to documentation folder:\n\n* [./documentation/HOTP.md](https://github.com/akanass/rx-otp/blob/master/documentation/HOTP.md)\n* [./documentation/TOTP.md](https://github.com/akanass/rx-otp/blob/master/documentation/TOTP.md)\n* [./documentation/U2F.md](https://github.com/akanass/rx-otp/blob/master/documentation/U2F.md)\n\n[Back to top](#table-of-contents)\n\n## Contributing\n\nTo set up your development environment:\n\n1. clone the repo to your workspace,\n2. in the shell `cd` to the main folder,\n3. hit `npm or yarn install`,\n4. run `npm or yarn run test`.\n    * It will lint the code and execute all tests. \n    * The test coverage report can be viewed from `./coverage/lcov-report/index.html`.\n\n[Back to top](#table-of-contents)\n\n## Change History\n\n* v2.0.0 (2021-10-11)\n    * Upgrade all packages' versions to move on `rxjs:7.4.0` and delete incompatible packages\n    * Delete browser single version due to incompatibility\n    * Delete `es5` version and now module is only on `es2015` and if you want an older support, your bundle system should transpile it to `es5`\n    * Fix tests\n    * Documentation\n* v1.1.0 (2019-07-12)\n    * Change repository owner name\n    * Latest packages' versions\n    * Fix tests\n    * Documentation\n* v1.0.0 (2019-03-08)\n    * Add **scope** to library and move to **`@akanass/rx-otp`**\n    * Rewritten all **library and test files in `Typescript`**\n    * Add `typings` support\n    * Use `JEST` for testing\n    * Use [json-schema](https://json-schema.org/) and [ajv](https://github.com/epoberezkin/ajv) library to validate functions' parameters\n\n[Back to top](#table-of-contents)\n\n## License\nCopyright (c) 2021 **Nicolas Jessel**. Licensed under the [MIT license](https://github.com/akanass/rx-otp/blob/master/LICENSE.md).\n\n[Back to top](#table-of-contents)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakanass%2Frx-otp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakanass%2Frx-otp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakanass%2Frx-otp/lists"}