title: If it is possible to login automatically after register laravel api using passport
body: <p>Register Api for Android App  stored And Return the response Success. I want know If its possible to Automatically Login if Register Success We are using </p>
  
  <blockquote>
    <p>php artisan make:auth</p>
  </blockquote>
  
  <p>in Laravel Web</p>
  
  <pre><code> public function signup(Request $request){
  
      try{
           $User = $request-&gt;all();
           if($request-&gt;has('referal_code')){
               $User['referal_code'] = $request-&gt;referal_code;
          }
           $User['password'] = bcrypt($request-&gt;password);
           $User['picture']  = 'http://lorempixel.com/100/100/';
           $User = User::create($User);
          return $User;
      }catch(Exception $e){
           return response()-&gt;json(['error' =&gt;'api.something_went_wrong'], 500);
      }
   }
  }
  </code></pre>
  
  <p>Login Api</p>
  
  <pre><code>  public function login(){ 
      if(Auth::attempt(['email' =&gt; request('email'), 'password' =&gt; request('password')])){ 
          $user = Auth::user(); 
          $success['token'] =  $user-&gt;createToken('MyApp')-&gt; accessToken; 
          return response()-&gt;json(['success' =&gt; $success], $this-&gt; successStatus); 
      } 
      else{ 
          return response()-&gt;json(['error'=&gt;'Unauthorised'], 401); 
      } 
  }
  </code></pre>