go-steam-totp

Go package to generate Steam-style TOTP auth codes

MIT License

Stars
13
Committers
1

Go Steam TOTP

This package generates Steam-style 5-digit alphanumeric two-factor authentication codes given a shared secret.

Installation

$ go get github.com/fortis/go-steam-totp

Usage

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

Documentation is hosted at GoDoc project.

Acknowledgments

License

This project is licensed under the MIT License - see the LICENSE.md file for details