{"id":18664900,"url":"https://github.com/mazkdevf/keyauth-js-module","last_synced_at":"2026-07-15T01:39:19.791Z","repository":{"id":65522867,"uuid":"486672018","full_name":"mazkdevf/KeyAuth-JS-Module","owner":"mazkdevf","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-15T20:36:27.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-21T10:41:22.390Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/keyauth-js-module","language":"JavaScript","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/mazkdevf.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":null,"security":null,"support":null}},"created_at":"2022-04-28T16:35:28.000Z","updated_at":"2023-02-02T12:37:54.000Z","dependencies_parsed_at":"2023-02-09T23:45:59.277Z","dependency_job_id":null,"html_url":"https://github.com/mazkdevf/KeyAuth-JS-Module","commit_stats":null,"previous_names":["mazk5145/keyauth-js-module"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mazkdevf/KeyAuth-JS-Module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazkdevf%2FKeyAuth-JS-Module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazkdevf%2FKeyAuth-JS-Module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazkdevf%2FKeyAuth-JS-Module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazkdevf%2FKeyAuth-JS-Module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mazkdevf","download_url":"https://codeload.github.com/mazkdevf/KeyAuth-JS-Module/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazkdevf%2FKeyAuth-JS-Module/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35486961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-07T08:25:25.789Z","updated_at":"2026-07-15T01:39:19.774Z","avatar_url":"https://github.com/mazkdevf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KeyAuth JS Module\r\n\r\n## Code\r\n```js\r\nimport * as KeyAuth from 'keyauth-js-module'\r\nimport readline from \"readline\";\r\nimport moment from \"moment\"\r\n\r\nconst rl = readline.createInterface({\r\n    input: process.stdin,\r\n    output: process.stdout\r\n})\r\n\r\nKeyAuth.api(\r\n    \"\", // Application Name\r\n    \"\", // OwnerID\r\n    \"\", // Application Secret\r\n    \"1.0\" // Application Version\r\n)\r\n\r\nawait KeyAuth.cls();\r\nawait KeyAuth.init();\r\n\r\nif (!KeyAuth.response.success) {\r\n    KeyAuth.error(\"Status: \" + KeyAuth.response.message)\r\n}\r\n\r\nKeyAuth.Title(\"KeyAuth JS Example - 1.1 API\")\r\nconsole.log(\"\\n Application Data:\")\r\nconsole.log(` Number of users: ${KeyAuth.app_data.numUsers}`)\r\nconsole.log(` Number of online users: ${KeyAuth.app_data.numOnlineUsers}`)\r\nconsole.log(` Number of keys: ${KeyAuth.app_data.numKeys}`)\r\nconsole.log(` Application Version: ${KeyAuth.app_data.version}`)\r\nconsole.log(` Customer panel link: ${KeyAuth.app_data.customerPanelLInk}\\n`)\r\nawait KeyAuth.check();\r\nawait KeyAuth.Sleep(1200);\r\nconsole.log(` Current Session Validation Status: ${KeyAuth.response.message}`);\r\nconsole.log(` Blacklisted: ${await KeyAuth.checkblacklist()}`);\r\n\r\nawait rl.question(\"\\n [1] Login\\n [2] Register\\n [3] Upgrade\\n [4] License key only\\n\\n Choose option: \", async function(choice) {\r\n    if (choice === \"1\") {\r\n        rl.question(\"Whats your username: \", async function(username) {\r\n            rl.question(\"Whats your password: \", async function(password) {\r\n                await KeyAuth.Login(username, password);\r\n                if (!KeyAuth.response.success) {\r\n                    KeyAuth.error(\"Status: \" + KeyAuth.response.message)\r\n                }\r\n                loggedin();\r\n                rl.close();\r\n            })\r\n        })\r\n    } \r\n    else if (choice === \"2\") {\r\n        rl.question(\"Whats your username: \", async function(username) {\r\n            rl.question(\"Whats your password: \", async function(password) {\r\n                rl.question(\"Whats your License: \", async function(key) {\r\n                    await KeyAuth.Register(username, password, key);\r\n                    if (!KeyAuth.response.success) {\r\n                        KeyAuth.error(\"Status: \" + KeyAuth.response.message)\r\n                    }\r\n                    loggedin();\r\n                    rl.close();\r\n                })\r\n            })\r\n        })\r\n    }\r\n    else if (choice === \"3\") {\r\n        rl.question(\"Whats your username: \", async function(username) {\r\n            rl.question(\"Whats your License: \", async function(key) {\r\n                await KeyAuth.Upgrade(username, key);\r\n                if (!KeyAuth.response.success) {\r\n                    KeyAuth.error(\"Status: \" + KeyAuth.response.message)\r\n                }\r\n                loggedin();\r\n                rl.close();\r\n            })\r\n        })\r\n    }\r\n    else if (choice === \"4\") {\r\n        rl.question(\"Whats your License: \", async function(key) {\r\n            await KeyAuth.License(key);\r\n            if (!KeyAuth.response.success) {\r\n                KeyAuth.error(\"Status: \" + KeyAuth.response.message)\r\n            }\r\n            loggedin();\r\n            rl.close();\r\n        })\r\n    }\r\n    else {\r\n        console.log(\"?\")\r\n        rl.close();\r\n    }\r\n})\r\n\r\nasync function loggedin() {\r\n    console.log(\"\\n Logged In!\")\r\n\r\n    console.log(` Username: ${KeyAuth.user_data.username}`)\r\n    console.log(` IP address: ${KeyAuth.user_data.ip}`)\r\n    console.log(` Hardware-Id: ${KeyAuth.user_data.hwid}`)\r\n    console.log(` Created at: ${moment.unix(KeyAuth.user_data.createdate).format(\"DD-MM-YYYY - HH:mm:ss\")}`)\r\n    console.log(` Last Login: ${moment.unix(KeyAuth.user_data.lastlogin).format(\"DD-MM-YYYY - HH:mm:ss\")}`)\r\n\r\n\r\n    for (var i = 0; i \u003c KeyAuth.user_data.subscriptions.length; i++)\r\n    {\r\n        console.log(` [${i}] Subscription name: ${KeyAuth.user_data.subscriptions[i].subscription} | Expires at: ${moment.unix(KeyAuth.user_data.subscriptions[i].expiry).format(\"DD-MM-YYYY - HH:mm:ss\")} | Time left in seconds ${KeyAuth.user_data.subscriptions[i].timeleft}`)\r\n    }\r\n\r\n\r\n    KeyAuth.check();\r\n    console.log(` Current Session Validation Status: ${KeyAuth.response.message}`);\r\n\r\n    console.log(\"\\n\\n Closing in 10 seconds...\")\r\n    await KeyAuth.Sleep(10000);\r\n    process.exit(0);\r\n}\r\n\r\n```\r\n\r\n### Credits\r\n```md\r\n# readline - https://www.npmjs.com/package/readline\r\n# moment - https://www.npmjs.com/package/moment\r\n# Axios - https://www.npmjs.com/package/axios\r\n# Systeminformation - https://www.npmjs.com/package/systeminformation\r\n# Querystring - https://www.npmjs.com/package/querystring\r\n```\r\n\r\n### Creator\r\nmazkdevf - mazk9145\r\n\r\n## Copyright License\r\n\r\nKeyAuth is licensed under **Elastic License 2.0**\r\n\r\n* You may not provide the software to third parties as a hosted or managed\r\nservice, where the service provides users with access to any substantial set of\r\nthe features or functionality of the software.\r\n\r\n* You may not move, change, disable, or circumvent the license key functionality\r\nin the software, and you may not remove or obscure any functionality in the\r\nsoftware that is protected by the license key.\r\n\r\n* You may not alter, remove, or obscure any licensing, copyright, or other notices\r\nof the licensor in the software. Any use of the licensor’s trademarks is subject\r\nto applicable law.\r\n\r\nThank you for your compliance, we work hard on the development of KeyAuth and do not appreciate our copyright being infringed.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazkdevf%2Fkeyauth-js-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmazkdevf%2Fkeyauth-js-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazkdevf%2Fkeyauth-js-module/lists"}