Refine forced password change flow
linter / quality (pull_request) Successful in 1m19s
tests / ci (8.4) (pull_request) Successful in 1m31s

This commit is contained in:
2026-05-22 18:57:10 +00:00
parent d13e919310
commit 5bb6e57db4
6 changed files with 204 additions and 6 deletions
@@ -25,14 +25,19 @@ class RequirePasswordChange
'logout',
'password.confirm',
'password.confirm.*',
'password.force-change.edit',
'security.edit',
'user-password.update',
])) {
return $next($request);
}
if ($request->isMethod('get') && ! $request->expectsJson()) {
$request->session()->put('url.intended', $request->fullUrl());
}
return redirect()
->route('security.edit')
->route('password.force-change.edit')
->with('status', 'You must change your password before continuing.');
}
}