1 Answer(s)
-
0
When users see a "Confirm Form Resubmission" page after clicking the browser back button from the forgot password page, it is due to the browser trying to re-execute a POST request. This is a standard browser behavior when navigating back to a page that was the result of a form submission (POST).
To avoid this, you should implement the Post/Redirect/Get (PRG) pattern in your ABP login and forgot password flows. After processing a POST request (such as submitting the forgot password form), redirect the user to a GET page (such as a confirmation or the login page). This way, if the user navigates back, the browser will only re-request the GET page, not the POST, and the resubmission warning will not appear.
Example for Razor Pages:
public async Task<IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return Page(); } // Process forgot password logic here // Redirect to a confirmation page (GET) return RedirectToPage("./ForgotPasswordConfirmation"); }
This approach ensures that after a POST, the user is always redirected to a GET, preventing form resubmission issues.
Sources:
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.