Support the ongoing development of Laravel.io →
Authentication Security
Last updated 2 years ago.
0

hmm doesn't sound that bad. Here are my quick thoughts.

First create your own "AuthController". This is going to be your main item here. You will want this to do the heavy lifting. All you really need is the one function, and you can refactor it as you please.

public function login()
{
  $ip = $_SERVER['REMOTE_ADDR'];
  $result = shell_exec('something');
  $user = User::where('id', $result)->first();
  if(! $user) {
    return 'user not found in usertable';
  }

  auth()->login($user); // or \Auth::login($user);

  return redirect()->route('home');
}

Anyway first thoughts, so the login goes to that "route" and it would handle the informtion.

~ https://laracademy.co/

Last updated 7 years ago.
0

Thank you, it was not so hard as I thought, I created an AuthController based on your sketch, and it works perfectly.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.