{"id":20529377,"url":"https://github.com/andrenerd/gin-multifactor-authentication","last_synced_at":"2025-03-06T02:19:19.956Z","repository":{"id":54166795,"uuid":"328046440","full_name":"andrenerd/gin-multifactor-authentication","owner":"andrenerd","description":"Gin Multifactor Authentication","archived":false,"fork":false,"pushed_at":"2021-03-05T23:11:41.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-12-21T05:20:45.410Z","etag":null,"topics":["1fa","2fa","aip","authentication","email","gin","golang","mfa","mobile","passcode","password","phonew","pin","token","two-factor-authentication","web"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrenerd.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}},"created_at":"2021-01-09T00:58:04.000Z","updated_at":"2023-12-21T05:20:45.411Z","dependencies_parsed_at":"2022-08-13T08:10:27.249Z","dependency_job_id":null,"html_url":"https://github.com/andrenerd/gin-multifactor-authentication","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrenerd%2Fgin-multifactor-authentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrenerd%2Fgin-multifactor-authentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrenerd%2Fgin-multifactor-authentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrenerd%2Fgin-multifactor-authentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrenerd","download_url":"https://codeload.github.com/andrenerd/gin-multifactor-authentication/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242133669,"owners_count":20077121,"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":["1fa","2fa","aip","authentication","email","gin","golang","mfa","mobile","passcode","password","phonew","pin","token","two-factor-authentication","web"],"created_at":"2024-11-15T23:31:26.828Z","updated_at":"2025-03-06T02:19:19.901Z","avatar_url":"https://github.com/andrenerd.png","language":"Go","readme":"# Gin Multifactor Authentication\n\n\nv 0.0.1\n\n\nFlexible authentication for web, mobile, desktop and hybrid apps. Can be used for 1fa, 2fa and mfa scenarios. Easily configurable and extendable with new authentication methods, called `services`. All authenticaton scenarios, called `flows`, are based on `identifiers` and `secrets`, which can be used or not used in multiple combinations:\n- username, email, phone, ...\n- password, passcode (aka one-time pass or token), hardcode (aka device or card id), ...\n\nFull list of supported services (devices):\n- Email (soon)\n- Phone (as Sms)\n- WhatsApp (soon)\n- Google Authenticator\n- Microsoft Authenticator\n- Authy, andOTP, etc\n- Yubikey (soon)\n- ...add yours\n\nand service providers:  \n- Twilio\n- Vonage (Nexmo) (soon)\n- Amazon SNS (soon)\n- ...add yours\n\n\n\n### Usage\nSee an example app in the `/example` folder.\n\n\n```\n// Init with specific flow(s):\n// authenticate user if all (username, password, passcode) params are valid\nauth := multauth.Auth{\n        Flows: []multauth.Flow{{\"Username\", \"Password\", \"Passcode\"}},\n}\n\napp := gin.Default()\n\napp.POST(\"/signin\", func(c *gin.Context) {\n        // ...Grab params from the context and store them in the \"data\" map\n\n        err := auth.Authenticate(map[string]interface{}{\n                \"Username\": data[\"username\"],\n                \"Password\": data[\"password\"],\n                \"Passcode\": data[\"passcode\"], // with Google Authenticator or so\n        }, user)\n\n        if err == nil {\n                c.JSON(200, gin.H{\n                        \"message\": \"Welcome \" + user.Username,\n                        \"token\": \"YOUR_JWT_TOKEN\",\n                })\n        }\n})\n\napp.Run()\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrenerd%2Fgin-multifactor-authentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrenerd%2Fgin-multifactor-authentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrenerd%2Fgin-multifactor-authentication/lists"}