+
+ /**
+ * Show the view for the "Access & Security" account options.
+ */
+ public function showAuth(SocialAuthService $socialAuthService)
+ {
+ $mfaMethods = user()->mfaValues->groupBy('method');
+
+ $this->setPageTitle(trans('preferences.auth'));
+
+ return view('users.account.auth', [
+ 'category' => 'auth',
+ 'mfaMethods' => $mfaMethods,
+ 'authMethod' => config('auth.method'),
+ 'activeSocialDrivers' => $socialAuthService->getActiveDrivers(),
+ ]);
+ }
+
+ /**
+ * Handle the submission for the auth change password form.
+ */
+ public function updatePassword(Request $request)
+ {
+ if (config('auth.method') !== 'standard') {
+ $this->showPermissionError();
+ }
+
+ $validated = $this->validate($request, [
+ 'password' => ['required_with:password_confirm', Password::default()],
+ 'password-confirm' => ['same:password', 'required_with:password'],
+ ]);
+
+ $this->userRepo->update(user(), $validated, false);
+
+ $this->showSuccessNotification(trans('preferences.auth_change_password_success'));
+
+ return redirect('/my-account/auth');
+ }