Replies: 1 comment
-
Any update please ? this is very annoying not submitting post data with this middleware |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When applying
password.confirm
to aGET
route, it works smoothly as expected: the user has to confirm their password before they can view the page.But it falls short with
POST
/PATCH
routes. When using it with one of these routes, the user is prompted to fill out the form, then they hit submit and are asked to confirm their password. But once they've confirmed it, they're just redirected back to the previous page, and their input has been forgotten.I think the middleware should check if the request has any input, and if so, flash it to the session. Then when the
handle()
method is called again — andshouldConfirmPassword()
returns false, as they've already confirmed it — the original request data should be passed along wherereturn $next($request)
is currently.I'm happy to put a PR in for this, but before I do, are there any edge cases I haven't considered?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions