Skip to content

ilhesam/OTP.WithoutDb.NET

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An idea for eliminating the need for a database when using OTP (One-Time Password) in .NET

As I have seen, most applications use database for the OTP Verification section and assign one or more tables to OTP.
This makes sense in terms of storing and reviewing data, but increases database transactions and thus slows down the database.

What is the solution?
We can implement Generate and Verify operations in application logic!

But how?
Using cryptography, we encrypt the data we want and send it to the client as a key.

How to verify the accuracy of the information?
We decrypt the key sent to us by the client and then perform the operations required to verify the information.

Generate OTP Schema

  1. Generate Random Code (Password)
  2. Create and Serialize OTP JSON Object
  3. Encrypt OTP JSON Object

Verify OTP Schema

  1. Decrypt Key
  2. Deserialize OTP JSON Object
  3. Check the accuracy of the information

About

OTP Verification without Database in .NET

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages