{"id":20364348,"url":"https://github.com/bandwidth/node-mfa","last_synced_at":"2026-05-21T16:46:31.447Z","repository":{"id":42182184,"uuid":"267926933","full_name":"Bandwidth/node-mfa","owner":"Bandwidth","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-01T15:41:08.000Z","size":1339,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2026-04-01T21:09:51.878Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bandwidth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-05-29T18:22:20.000Z","updated_at":"2026-04-01T15:41:13.000Z","dependencies_parsed_at":"2023-02-12T04:33:06.579Z","dependency_job_id":"7fe04f52-2e41-4606-8cd6-cb42b450438b","html_url":"https://github.com/Bandwidth/node-mfa","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/Bandwidth/node-mfa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bandwidth%2Fnode-mfa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bandwidth%2Fnode-mfa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bandwidth%2Fnode-mfa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bandwidth%2Fnode-mfa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bandwidth","download_url":"https://codeload.github.com/Bandwidth/node-mfa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bandwidth%2Fnode-mfa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33307370,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"ssl_error","status_checked_at":"2026-05-21T12:22:11.673Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-15T00:11:23.194Z","updated_at":"2026-05-21T16:46:31.440Z","avatar_url":"https://github.com/Bandwidth.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# $${\\color{orange}This \\space package  \\space has  \\space been  \\space deprecated}$$\r\n# Please use the new [node-sdk](https://github.com/Bandwidth/node-sdk)\r\n## The new package is on NPM as [bandwidth-sdk](https://www.npmjs.com/package/bandwidth-sdk) (`npm i bandwidth-sdk`)\r\n\r\n# Bandwidth Node Multi-Factor Authentication SDK\r\n\r\nNote: As of version 3.0.0, this package has been upgraded to TypeScript\r\n\r\n[![Test](https://github.com/Bandwidth/node-mfa/actions/workflows/test.yml/badge.svg)](https://github.com/Bandwidth/node-mfa/actions/workflows/test.yml)\r\n\r\n|    **OS**    | **Node** |\r\n|:------------:|:---:|\r\n| Windows 2022 | 12, 14, 16 |\r\n| Windows 2025 | 12, 14, 16 |\r\n| Ubuntu 22.04 | 12, 14, 16 |\r\n| Ubuntu 24.04 | 12, 14, 16 |\r\n\r\n## Getting Started\r\n\r\n### Installation\r\n\r\n```\r\nnpm install @bandwidth/mfa\r\n```\r\n\r\n### Initialize\r\n\r\n```\r\nimport { Client, MFAController } from '@bandwidth/mfa';\r\n\r\nconst client = new Client({\r\n    basicAuthUserName: \"username\",\r\n    basicAuthPassword: \"password\"\r\n});\r\n\r\nconst controller = new MFAController(client);\r\nconst accountId = \"12345\";\r\n```\r\n\r\n### Create A MFA Request\r\n\r\n```\r\nvar from = \"+15554443333\";\r\nvar to = \"+15553334444\";\r\nvar applicationId = \"3-a-b-c\";\r\nvar scope = \"scope\";\r\nvar digits = 6;\r\nvar message = \"Your temporary {NAME} {SCOPE} code is {CODE}\";\r\n\r\nvar requestBody = {\r\n    from: from,\r\n    to: to,\r\n    applicationId: applicationId,\r\n    scope: scope,\r\n    digits: digits,\r\n    message: message\r\n};\r\n\r\nawait controller.voiceTwoFactor(accountId, requestBody);\r\n\r\n//request verification\r\nconst code = '123456'; //this is the user input to validate\r\nconst expirationTimeInMinutes = 3\r\n\r\nvar verifyBody = {\r\n    to: to,\r\n    applicationId: applicationId,\r\n    scope: scope,\r\n    code: code,\r\n    expirationTimeInMinutes: expirationTimeInMinutes\r\n}\r\n\r\nvar verifyMfaResponse = await controller.verifyTwoFactor(accountId, verifyBody);\r\n\r\nconsole.log(verifyMfaResponse.result.valid);\r\n```\r\n\r\n## Supported Node Versions\r\n\r\nThis package can be used with Node \u003e= 10\r\n\r\n## Documentation\r\n\r\nDocumentation for this package can be found at https://dev.bandwidth.com/sdks/node.html\r\n\r\n## Credentials\r\n\r\nInformation for credentials for this package can be found at https://dev.bandwidth.com/guides/accountCredentials.html\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbandwidth%2Fnode-mfa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbandwidth%2Fnode-mfa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbandwidth%2Fnode-mfa/lists"}