googauth

package module
v0.0.0-...-190d748 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

README

googauth

Impl the Google Authenticator function requires both server-side and client-side support. The server is responsible for key generation and verifying whether the one-time password is correct

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTOTPSecret

func NewTOTPSecret() string

NewTOTPSecret returns a underlying base32 encoded secret. This should only be displayed the first time a user enables 2FA, and should be transmitted over a secure connection. Useful for supporting TOTP clients that don't support QR scanning.

func TOTPQrString

func TOTPQrString(label, issuer, secret string) (qr string)

TOTPQrString is the QR code string of the QR code that ccaned by google authenticator.

func VerifyPasscode

func VerifyPasscode(secret, code string) bool

VerifyPasscode validates the user provided code.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL