Domanda

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.

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top