Laravel Redirect Security -
this post in response answers provided by... laravel subdomain redirect login
i decided go second answer provided, made edits it. have switch in 2 places...
the first here inside of authenticated method inside of illuminate\foundation\auth\authenticatedusers
/** * user has been authenticated. * * @param \illuminate\http\request $request * @param mixed $user * @return mixed */ protected function authenticated(request $request, $user) { switch ($user->getgroup()) { case 'athlete': return redirect('http://athlete.main.dev/login')->with([ 'email' => $request['email'], 'password' => $request['password'], ]); case 'coach': // implement same above, coach. } }
the second inside of app\http\controllers\homecontroller
/** * show application dashboard. * homecontroller main.dev * @return view; */ public function index() { case 'athlete': return redirect('http://athlete.main.dev/'); case 'coach': // implemented same above coach. } }
this appears work, since handling emails , passwords have 1 final question. how secure this? able snoop in on password redirected via man in middle or data encrypted? actual website utilizes https connection secure in real world application. however, still secure way go?
Comments
Post a Comment