{"id":24291645,"url":"https://github.com/thomastjdev/nim_yubikey_otp","last_synced_at":"2026-05-29T06:31:07.345Z","repository":{"id":270699011,"uuid":"911193379","full_name":"ThomasTJdev/nim_yubikey_otp","owner":"ThomasTJdev","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-11T14:55:10.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T04:20:42.719Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nim","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/ThomasTJdev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-02T13:01:28.000Z","updated_at":"2025-02-11T14:55:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"055343b7-0260-4923-a586-d45a9eec6228","html_url":"https://github.com/ThomasTJdev/nim_yubikey_otp","commit_stats":null,"previous_names":["thomastjdev/nim_yubikey_otp"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ThomasTJdev/nim_yubikey_otp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasTJdev%2Fnim_yubikey_otp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasTJdev%2Fnim_yubikey_otp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasTJdev%2Fnim_yubikey_otp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasTJdev%2Fnim_yubikey_otp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThomasTJdev","download_url":"https://codeload.github.com/ThomasTJdev/nim_yubikey_otp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThomasTJdev%2Fnim_yubikey_otp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33640627,"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-05-29T02:00:06.066Z","response_time":107,"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":"2025-01-16T14:56:19.606Z","updated_at":"2026-05-29T06:31:07.325Z","avatar_url":"https://github.com/ThomasTJdev.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yubikey_otp\n\nFor general information see:\n* https://developers.yubico.com/OTP/OTP_Walk-Through.html\n* https://developers.yubico.com/yubikey-val/Validation_Protocol_V2.0.html\n* https://docs.yubico.com/yesdk/users-manual/application-otp/yubico-otp.html\n* https://upgrade.yubico.com/getapikey/\n\nThis is a simple api call and validator for the yubikey's OTP.\n\n## 1. Set up\n\nGo to `https://upgrade.yubico.com/getapikey/` and get an API key. Save the\nclientID.\n\n## 2. Register user on \u003cplatform\u003e\n\n```nim\n  let\n    clientID = \u003cclientID from step 1\u003e\n    otp = \u003cusers otp from yubikey\u003e\n\n  let\n    data = yubikeyRegister(clientID, otp)\n\n  if data.success:\n    # Save the `data.publicID` to the database and associate it with the user\n  else:\n    # Handle the error\n```\n\n## 3. Validate on login\n\n```nim\n  let\n    clientID = \u003cclientID from step 1\u003e\n    publicID = \u003cusers publicID from registration\u003e\n    otp = \u003cusers otp from yubikey\u003e\n\n  if yubikeyValidate(clientID, publicID, otp):\n    # Success\n  else:\n    # Failure\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomastjdev%2Fnim_yubikey_otp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomastjdev%2Fnim_yubikey_otp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomastjdev%2Fnim_yubikey_otp/lists"}