Question

How can I know the user clicked the password link for the first time only in Asp.Net Identity 2 . If user click the link multiple times it should not work.We can set the time for the link but how to set no clicks in the token generated.

Was it helpful?

Solution

To store the number of clicks just use a flag in your database described by GujjuDeveloper

If you want to be sure that the link isn't used a second time you can invalidate the token used in the URL by calling userManager.UpdateSecurityStampAsync()

For more information about revoking a token please read this post: Revoke token generated by UserTokenProvider in ASP.NET Identity 2.0

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top