0

I Create system that sending to client link to reset password with guid value. When the client enter the link it open for him page that he can change password (NewPassword & ConfirmPassword)

My problem is that when he click the change button the guid in url content has reset and i don't know how to fix it.

for example:

before click:

https://mywebsite.com/ResetPassword?token=d4sd5sd4s5d4s4ds

after click submit:

https://mywebsite.com/ResetPassword

How i can do after click on submit it will stay with the token parameter?

Nick is tired
  • 6,860
  • 20
  • 39
  • 51
Dan
  • 19
  • 5
  • Put the GUID in either a server session variable or in Javascript sessionStorage object? – Bestter Jul 10 '19 at 18:23
  • i need that token parameter not removed – Dan Jul 10 '19 at 18:27
  • MVC remove those parameter by default. You either add it back manually, or your keep the information somewhere else. If you MUST keep the information in the QueryString, this is a solution: https://stackoverflow.com/questions/1067200/how-to-add-querystring-values-with-redirecttoaction-method – Bestter Jul 10 '19 at 18:54
  • Please don't make more work for other people by vandalizing your posts. By posting on the Stack Exchange network, you've granted a non-revocable right, under the [CC BY-SA 3.0 license](https://creativecommons.org/licenses/by-sa/3.0/), for Stack Exchange to distribute that content (i.e. regardless of your future choices). By Stack Exchange policy, the non-vandalized version of the post is the one which is distributed. Thus, any vandalism will be reverted. If you want to know more about deleting a post please see: [How does deleting work?](https://meta.stackexchange.com/q/5221) – Nick is tired Jul 12 '19 at 15:59
  • why do you need to keep the GUID in the URL specifically? If you store it in the session you can keep the link to the user's reset attempt. – ADyson Jul 12 '19 at 16:24
  • but if you want help putting it back in the URL, then please show us your code. You might need to add it back in manually. Depends how your view and action method work – ADyson Jul 12 '19 at 16:39

0 Answers0