© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
4 replies
no >> body

❔ ASP.NET Core Identity OTP creation date

So, currently, I have an authentication server (not with IdentityServer4/Duende).
I have enabled two-factor authentication, and I want users to be able to send sms with otp only once per 60 seconds.

From what I see, there is no information in AspNetUserTokens about the date it was generated.

So I have an idea to expand this table with an additional column with a time stamp, so I can track when otp was created and prevent user from sending a new one if it was created recently.
I've added a new migration and recreated a database, and now table AspNetUserTokens contains a new row which indicates creation date.

Now I'm trying to figure out how to make Identity use my new class with a Created property.

I'm also wondering if I'm in a right direction or it should be implemented in the different way.

Would be glad to hear any ideas/advices.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

ASP.NET Core Identity?
C#CC# / help
3y ago
asp.net core Identity ApplicationDbContext error
C#CC# / help
3y ago
✅ Hashing password - ASP.NET Core Identity PasswordHasher
C#CC# / help
3y ago
✅ ASP.NET Core Web API Model Creation.
C#CC# / help
10mo ago