{"id":35099199,"url":"https://github.com/conradsheeran/steam-totp","last_synced_at":"2026-05-21T03:33:06.972Z","repository":{"id":267717831,"uuid":"901964980","full_name":"conradsheeran/steam-totp","owner":"conradsheeran","description":"A library developed using the ArkTS language to obtain Steam mobile authentication codes | 使用 ArkTS 语言开发的实现获取 Steam 手机令牌验证码的库","archived":false,"fork":false,"pushed_at":"2024-12-27T13:19:54.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T13:38:16.070Z","etag":null,"topics":["arkts","harmony","harmonyos","steam","totp","totp-generator"],"latest_commit_sha":null,"homepage":"https://tickauth.com","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/conradsheeran.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-11T16:38:51.000Z","updated_at":"2024-12-27T12:55:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"8e0f2ad5-c6ec-4e10-adab-b6475804d2c8","html_url":"https://github.com/conradsheeran/steam-totp","commit_stats":null,"previous_names":["conradsheeran/steam-totp"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/conradsheeran/steam-totp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conradsheeran%2Fsteam-totp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conradsheeran%2Fsteam-totp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conradsheeran%2Fsteam-totp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conradsheeran%2Fsteam-totp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conradsheeran","download_url":"https://codeload.github.com/conradsheeran/steam-totp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conradsheeran%2Fsteam-totp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33287474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T02:57:32.698Z","status":"ssl_error","status_checked_at":"2026-05-21T02:57:31.990Z","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":["arkts","harmony","harmonyos","steam","totp","totp-generator"],"created_at":"2025-12-27T16:31:27.275Z","updated_at":"2026-05-21T03:33:06.966Z","avatar_url":"https://github.com/conradsheeran.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# steam-totp\n\n使用 ArkTS 语言开发的实现获取 Steam 手机令牌验证码的库\n\n## 注意：\n\n1. **最低API要求**：API 12（5.0.0.102）\n2. **权限要求**: ohos.permission.INTERNET ( 用于获取服务器时间 )\n\n- 关于系统权限申请, 请参考 [HarmonyOS 开发指南](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/declare-permissions-V5)\n\n## 安装指南：\n\n### 方法一：从 ohpm 安装 (推荐)\n1. 通过 DevEco Studio 打开您的项目\n2. 在 DevEco Studio 的终端运行：\n\n```bash\nohpm install steam-totp\n```\n\n### 方法二：从 Github Release 安装\n1. 从 [Github Release](https://github.com/conradsheeran/steam-totp/releases) 下载所需 HAR 共享包\n2. 在 DevEco Studio 的终端运行：\n\n```bash\nohpm install path/to/steam-totp.har\n```\n\n### 方法三: 在 oh-package.json5 中设置依赖\n\n```json\n{\n  \"dependencies\": {\n    \"steam-totp\": \"^1.0.1\"\n  }\n}\n```\n\n## 使用方法\n\n### 1. generateAuthCode(secret: buffer.Buffer | string, timeOffset: number = 0)\n\n```typescript\nimport { SteamTOTP } from \"steam-totp\"\n\nconst code: string = await SteamTOTP.generateAuthCode(your_secret)\n\n// 通过获取服务器时间以传入 timeOffset\nconst timeOffset: number = (await getTimeOffset()).offset\nconst code: string = await SteamTOTP.generateAuthCode(your_secret, timeOffset)\n```\n\n### 2. generateConfirmationCode(identitySecret: buffer.Buffer | string, time: number, tag: string)\n\n```typescript\nconst timeOffset: number = (await getTimeOffset()).offset\nconst time: number = SteamTOTP.time(timeOffset)\nconst tag: string = \"allow\"\nconst code: string = await SteamTOTP.generateConfirmationCode(your_identitySecret, time, tag)\n```\n\n### 3. getDeviceID(steamID: string)\n\n```typescript\nconst deviceID: string = await SteamTOTP.getDeviceID(your_steamID)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconradsheeran%2Fsteam-totp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconradsheeran%2Fsteam-totp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconradsheeran%2Fsteam-totp/lists"}