Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 641 Bytes

README.md

File metadata and controls

23 lines (18 loc) · 641 Bytes

TotpAuth

Tiny library that allows you to Generate and Check TOTP. Based on TwoStepsAuthenticator https://github.com/glacasa/TwoStepsAuthenticator

Install via NuGet

NuGet Official Releases: NuGet

Usage

// Generate Secret
TotpAuth.Authenticator.GenerateKey() 
// Example: 5PC4TPFPQPX7HPOS

// Generate OTP
var totp = new TotpAuth.Authenticator();
totp.GetCode("SECRETKEY"); 
// Example: 788644

// Validate Code
var totp = new TotpAuth.Authenticator();
totp.CheckCode("5PC4TPFPQPX7HPOS", "788644"); 
// Example: true