Registry / auth / dgryski-dgoogauth

dgryski-dgoogauth

JSON →
library0.0.0-20190221195224-5a805980a5f3gogounverified

A Go implementation of the Google Authenticator TOTP algorithm for two-factor authentication.

go get github.com/dgryski/dgoogauth
INSTALL
IMPORT
SIG · DGRYSKI-DGOOGAUTH
D
dgryski-dgoogauth
authgov0.0.0-20190221195224-5a805980a5f3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dgoogauth
github.com/dgryski/dgoogauth

Validate a TOTP token using a shared secret

package main import ( "fmt" "github.com/dgryski/dgoogauth" ) func main() { secret := "JBSWY3DPEHPK3PXP" otpc := &dgoogauth.OTPConfig{ Secret: secret, WindowSize: 3, } valid, err := otpc.Authenticate("123456") if err != nil { panic(err) } fmt.Println(valid) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20190221195224-5a805980a5f3latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
27 hits · last 30 days
node
18
Amazon
1
OpenAI (training)
1
Resources
dgryski-dgoogauth — go get dgryski-dgoogauth · libregistry