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.

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top