0
私は、成功したユーザー名を私に与えて、それを受け取り、自分のLaravelアプリケーションにログインしようとすると、安心して安心できるAPIで認証します。ログインが完了すると、動作するように見えます。しかし、私はまだ私はゲストとして認証されているサイトの周りを移動するようにセッションを維持しているようには思われません。Laravel external Authentication
public function login(){
// I do a guzzle request that gives me the value of $response['username']
$Username = $response['username'];
$user = User::where('username','thomc')->first();
Auth::login($user);
return view('home');
}
これは私のUserモデルである:
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
protected $table = 'UserDetails';
}
マイテーブル:
- ユーザー名
- メール
- FIRST_NAME
- LAST_NAME
- BA
- Facebook_ID
- Google_ID