Skip to content

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

License

Notifications You must be signed in to change notification settings

anubhavranjan/TotpAuth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
 

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages