{"id":18635396,"url":"https://github.com/naughtygopher/verifier","last_synced_at":"2025-10-15T05:35:42.024Z","repository":{"id":143013174,"uuid":"214951539","full_name":"naughtygopher/verifier","owner":"naughtygopher","description":"A minimal, customizable Go package for Email \u0026 Mobile number verification","archived":false,"fork":false,"pushed_at":"2025-01-25T09:56:11.000Z","size":74,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T04:01:56.621Z","etag":null,"topics":["2fa-security","2factor","email","email-verification","go","golang","mobile-security","mobile-verification","multifactor-authentication","otp","otp-generator","sms","verification","verifier"],"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/naughtygopher.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":"2019-10-14T04:59:23.000Z","updated_at":"2024-10-11T11:26:58.000Z","dependencies_parsed_at":"2024-11-07T05:29:25.881Z","dependency_job_id":"d2f61c30-9297-4a12-b7d4-48828b516ba8","html_url":"https://github.com/naughtygopher/verifier","commit_stats":null,"previous_names":["naughtygopher/verifier","bnkamalesh/verifier"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naughtygopher%2Fverifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naughtygopher%2Fverifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naughtygopher%2Fverifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naughtygopher%2Fverifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naughtygopher","download_url":"https://codeload.github.com/naughtygopher/verifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648874,"owners_count":20972944,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["2fa-security","2factor","email","email-verification","go","golang","mobile-security","mobile-verification","multifactor-authentication","otp","otp-generator","sms","verification","verifier"],"created_at":"2024-11-07T05:24:49.436Z","updated_at":"2025-10-15T05:35:36.968Z","avatar_url":"https://github.com/naughtygopher.png","language":"Go","readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://repository-images.githubusercontent.com/214951539/5b1d4880-be23-11ea-956f-13b099260266\" alt=\"verifier gopher\" width=\"256px\"/\u003e\u003c/p\u003e\n\n[![](https://github.com/naughtygopher/verifier/actions/workflows/go.yml/badge.svg?branch=master)](https://github.com/naughtygopher/verifier/actions)\n[![Go Reference](https://pkg.go.dev/badge/github.com/naughtygopher/verifier.svg)](https://pkg.go.dev/github.com/naughtygopher/verifier)\n[![Go Report Card](https://goreportcard.com/badge/github.com/naughtygopher/verifier)](https://goreportcard.com/report/github.com/naughtygopher/verifier)\n[![Coverage Status](https://coveralls.io/repos/github/naughtygopher/verifier/badge.svg?branch=master)](https://coveralls.io/github/naughtygopher/verifier?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/creativecreature/sturdyc/blob/master/LICENSE)\n\n# Verifier\n\nVerifier package lets you verify emails \u0026 phone numbers, with customization available at different components. There's a functional (if provided with valid configurations) sample app provided [here](https://github.com/naughtygopher/verifier/blob/master/cmd/main.go).\n\n## How does it work?\n\nVerifier generates secrets with an expiry, appropriate for emails \u0026 mobile phones. In case of emails,\nit generates a 256 character long random alpha-numeric string, and a 6 character long numeric string\nfor mobile phones.\n\nBy default, it uses [AWS SES](https://aws.amazon.com/ses/) for sending e-mails \u0026 [AWS SNS](https://aws.amazon.com/sns/) for sending SMS/text messages.\n\n## How to customize?\n\nYou can customize the following components of verifier.\n\n```golang\n\n    // Customize the default templates\n    // there should be 2 string placeholders for email body. First is the 'callback URL' and 2nd is the expiry\n    verifier.DefaultEmailOTPPayload = ``\n    // there should be 1 string placeholder for SMS body. It will be the secret itself\n    verifier.DefaultSMSOTPPayload = ``\n    // ==\n\n    vsvc, err := verifier.NewCustom(\u0026Config{}, nil,nil,nil)\n\tif err != nil {\n\t\tlog.Println(err)\n\t\treturn\n    }\n\n    // Service provider for sending emails\n    err := v.CustomEmailHandler(email)\n\tif err != nil {\n        log.Println(err)\n\t\treturn\n    }\n    // ==\n\n    // Service provider for sending messages to mobile\n\terr = v.CustomMobileHandler(mobile)\n\tif err != nil {\n        log.Println(err)\n\t\treturn err\n    }\n    // ==\n\n    // Persistent store used by verifier for storing secrets and all the requests\n\terr = v.CustomStore(verStore)\n\tif err != nil {\n        log.Println(err)\n\t\treturn\n    }\n    // ==\n\n    // Using custom email \u0026 text message body\n    verreq, err := vsvc.NewRequest(verifier.CommTypeEmail, recipient)\n    if err != nil {\n        log.Println(err)\n        return\n    }\n\n    // callbackURL can be used inside the custom email body\n    callbackURL, err := verifier.EmailCallbackURL(\"https://example.com\", verreq.Recipient, verreq.Secret)\n    if err != nil {\n        log.Println(err)\n        return\n    }\n\n    err = vsvc.NewEmailWithReq(verreq, \"subject\", \"body\")\n    if err != nil {\n        log.Println(err)\n        return\n    }\n\n    err = vsvc.NewMobileWithReq(verreq, fmt.Sprintf(\"%s is your OTP\", verreq.Secret))\n    if err != nil {\n        log.Println(err)\n        return\n    }\n    // ==\n```\n\n## TODO\n\n1. Unit tests\n2. Setup a web service, which can be independently run, and consumed via APIs\n\n## The gopher\n\nThe gopher used here was created using [Gopherize.me](https://gopherize.me/). Verifier helps you keep those scammers and bots away just like our hacker gopher!\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaughtygopher%2Fverifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaughtygopher%2Fverifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaughtygopher%2Fverifier/lists"}