__('auth.too_many_attempts', ['seconds' => RateLimiter::availableIn($key)]), ]); } try { $this->validate([ 'current' => ['required', 'current_password'], 'password' => ['required', 'confirmed', Password::min(12)->mixedCase()->numbers()], ], attributes: [ 'current' => __('auth.attr_current_password'), 'password' => __('auth.attr_new_password'), ]); } catch (ValidationException $e) { if (array_key_exists('current', $e->errors())) { RateLimiter::hit($key, 60); } throw $e; } RateLimiter::clear($key); Auth::user()->forceFill([ 'password' => Hash::make($this->password), 'must_change_password' => false, ])->save(); // 2FA is optional now — go straight to the panel; 2FA is offered in Settings. return $this->redirect(route('dashboard'), navigate: true); } /** * Keep the current password for now — rotation is not forced. Remember the choice for this session * so the prompt does not reappear; `must_change_password` stays true, so the persistent default- * password banner keeps warning until the password is actually changed. */ public function skip() { session()->put('onboarding.password_skipped', true); return $this->redirect(route('dashboard'), navigate: true); } public function render() { return view('livewire.auth.password-change')->title(__('auth.title_password_change')); } }