This package generates Steam-style 5-digit alphanumeric two-factor authentication codes given a shared secret.
$ go get github.com/fortis/go-steam-totp
Generate 5-digit code to Log on Steam
package main
import (
"log"
"github.com/fortis/go-steam-totp"
)
func main() {
var sharedsecret = "cnOgv/KdpLoP6Nbh0GMkXkPXALQ="
code, _ := steam_totp.GenerateAuthCode(sharedsecret, time.Now())
log.Println(code)
}
Documentation is hosted at GoDoc project.
- To DoctorMcKay for the great nodejs module node-steam-totp
This project is licensed under the MIT License - see the LICENSE.md file for details