/** * @author LAHAXE Arnaud * * @return mixed */ public function auth() { try { $key = $this->u2f->doAuthenticate(Auth::user(), Session::get('u2f.authenticationData'), json_decode(Input::get('authentication'))); Event::fire('u2f.authentication', ['u2fKey' => $key, 'user' => Auth::user()]); Session::forget('u2f.authenticationData'); return $this->redirectAfterSuccessAuth(); } catch (Exception $e) { Session::flash('error', $e->getMessage()); return Redirect::route('u2f.auth.data'); } }