Skip to content

skyjia/go-otpserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-otpserver

A golang version of simple OTP server.

Reference: Google Authenticator

API

Get TOTP Authentication URL

POST /totp/authurl

Request

{
    "issuer":"My Company",
    "accountName":"foo@bar.com",
    "secret":"WgQacDUV24W4myXP"
}

Response

{
  "authURL": "otpauth://totp/My%20Company:foo@bar.com?issuer=My+Company&secret=K5TVCYLDIRKVMMRUK42G26KYKA"
}

Scan the QRCode below with Google Authenticator:

Verify TOTP Token

POST /totp/verify

Request

{
    "token": "123456",
    "secret": "WgQacDUV24W4myXP"
}

Response

{
  "isValid": true
}

About

A golang version OTP server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages