Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.26 KB

README.md

File metadata and controls

39 lines (27 loc) · 1.26 KB

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