data; $title = strval(trans('firefly.two_factor_title')); if (strlen($secret) === 0) { throw new FireflyException('Your two factor authentication secret is empty, which it cannot be at this point. Please check the log files.'); } Session::flash('two-factor-secret', $secret); return view('auth.two-factor', compact('user', 'title')); } /** * @return mixed * @throws FireflyException */ public function lostTwoFactor() { $user = Auth::user(); $siteOwner = env('SITE_OWNER', ''); $title = strval(trans('firefly.two_factor_forgot_title')); Log::info( 'To reset the two factor authentication for user #' . $user->id . ' (' . $user->email . '), simply open the "preferences" table and delete the entries with the names "twoFactorAuthEnabled" and' . ' "twoFactorAuthSecret" for user_id ' . $user->id . '. That will take care of it.' ); return view('auth.lost-two-factor', compact('user', 'siteOwner', 'title')); } /** * @param TokenFormRequest $request * * @return mixed */ public function postIndex(TokenFormRequest $request) { Session::put('twofactor-authenticated', true); Session::put('twofactor-authenticated-date', new Carbon); return redirect(route('home')); } }