authenticate user with phone laravel

Solutions on MaxInterview for authenticate user with phone laravel by the best coders in the world

showing results for - "authenticate user with phone laravel"
Antonella
01 Jan 2017
1It sounds like you wont be using much of the default AuthController for this as that will expect some form of username/password combo.
2
3You can however use the Auth facade by doing whatever authentication checks you want and then calling the login() method like so:
4
5// identify your user with your credentials (OTP)
6$user= User::where('password', $password)->get();
7
8// If you have a user, authenticate them
9if ($user) {
10    // Authenticate the user
11    Auth::login($user);
12}
13This is very bare bones but you can read more here (https://laravel.com/docs/5.8/authentication#other-authentication-methods)