{"id":37127728,"url":"https://github.com/lstep/gototp","last_synced_at":"2026-01-14T14:52:23.141Z","repository":{"id":57527369,"uuid":"47106425","full_name":"lstep/gototp","owner":"lstep","description":"Go Time-Based One Time Password.","archived":false,"fork":true,"pushed_at":"2018-01-16T10:21:46.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T16:57:07.602Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"bcleenders/gototp","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lstep.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":"2015-11-30T08:53:49.000Z","updated_at":"2018-01-16T10:21:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lstep/gototp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lstep/gototp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lstep%2Fgototp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lstep%2Fgototp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lstep%2Fgototp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lstep%2Fgototp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lstep","download_url":"https://codeload.github.com/lstep/gototp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lstep%2Fgototp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28424005,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":"2026-01-14T14:52:22.551Z","updated_at":"2026-01-14T14:52:23.118Z","avatar_url":"https://github.com/lstep.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"gototp\n======\n\nGo Time-Based One Time Password implemention of RFC6238 (http://tools.ietf.org/html/rfc6238)\n\nBased on pyotp: https://github.com/nathforge/pyotp\n\nUSAGE\n=====\ngototp is easy to use:\n\n1. Generate a random secret to store for a user:\n````\n    // A secret length of 10 gives a 16 character secret key\n    secret := gototp.RandomSecret(10)\n````\n\n2.  Create the OTP object:\n````\n    // Create the OTP\n    otp, err := gototp.New(secret)\n    if nil!=err {\n      panic(err)\n  \t}\n````\n3.  Find the current TOTP code:\n````\n    code := otp.Now()\n\n    // Or find the previous code and the next code\n    previousCode := otp.FromNow(-1)\n    nextCode := otp.FromNow(1)\n````\n4.  Generate a Google Charts URL for a QR Code of the Secret, with a label\n````\n    // Google Charts URL to display a QR Code, of width (and height) 300px\n    url := otp.QRCodeGoogleChartsUrl(\"My Own TOTP\", 300)\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flstep%2Fgototp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flstep%2Fgototp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flstep%2Fgototp/lists"}