/go-steam-totp

Go package to generate Steam-style TOTP auth codes

Primary LanguageGoMIT LicenseMIT

Go Steam TOTP

Build Status Coverage Status license

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