{"id":35019156,"url":"https://github.com/alex-cos/codeverif","last_synced_at":"2026-05-19T12:05:16.990Z","repository":{"id":329773905,"uuid":"1120607029","full_name":"alex-cos/codeverif","owner":"alex-cos","description":"Generating and verifying one-time verification codes","archived":false,"fork":false,"pushed_at":"2026-05-03T21:06:56.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-03T23:19:05.955Z","etag":null,"topics":["code","golang","verification"],"latest_commit_sha":null,"homepage":"","language":"Go","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/alex-cos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-21T15:17:57.000Z","updated_at":"2026-05-03T21:07:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/alex-cos/codeverif","commit_stats":null,"previous_names":["alex-cos/codeverif"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/alex-cos/codeverif","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-cos%2Fcodeverif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-cos%2Fcodeverif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-cos%2Fcodeverif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-cos%2Fcodeverif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alex-cos","download_url":"https://codeload.github.com/alex-cos/codeverif/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-cos%2Fcodeverif/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33215545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T07:54:09.561Z","status":"ssl_error","status_checked_at":"2026-05-19T07:54:08.508Z","response_time":58,"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":["code","golang","verification"],"created_at":"2025-12-27T05:40:04.284Z","updated_at":"2026-05-19T12:05:16.985Z","avatar_url":"https://github.com/alex-cos.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# codeverif\n\n[![Go Version](https://img.shields.io/badge/Go-1.23%2B-blue)](https://go.dev/)\n[![Test Status](https://github.com/alex-cos/codeverif/actions/workflows/test.yml/badge.svg)](https://github.com/alex-cos/codeverif/actions/workflows/test.yml)\n[![Lint Status](https://github.com/alex-cos/codeverif/actions/workflows/lint.yml/badge.svg)](https://github.com/alex-cos/codeverif/actions/workflows/lint.yml)\n[![License](https://img.shields.io/badge/License-MIT-green)](LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/alex-cos/codeverif)](https://goreportcard.com/report/github.com/alex-cos/codeverif)\n\n**codeverif** is a secure and lightweight Go module for generating and verifying **one-time verification codes**.\n\nIt is designed for common authentication flows such as:\n\n- Login verification\n- Password reset\n- Email confirmation\n\nThe module is backend-oriented and integrates naturally into REST APIs (Gin, Echo, net/http).\n\n---\n\n## ✨ Features\n\n- 🔐 Cryptographically secure numeric codes\n- ⏱ Code expiration handling\n- 🔁 Limited verification attempts\n- 🧪 Unit-tested\n- 🌐 REST API friendly\n\n---\n\n## 📦 Installation\n\n```bash\ngo get github.com/alex-cos/codeverif\n```\n\n---\n\n## Example\n\n```go\n// create a codeverif for a 6 digits code available during 10 minutes with 3 attempts.\ncv := codeverif.New(6, 10*time.Minute, 3)\n\ncode, err := cv.RequestCode(\"JohnDoe\")\nif err != nil {\n  return err\n}\n\n// Send the generated code by mail to the end user for verification\n\n// Then when asked verified the entered code.\nerr = cv.VerifyCode(\"JohnDoe\", code)\nif err == nil {\n  // Code successfully verified\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-cos%2Fcodeverif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falex-cos%2Fcodeverif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-cos%2Fcodeverif/lists"}