@MadMikeyB
thk bro for answering me , this my registerController method code
public function register(Request $request)
{
$this->validate($request, [
'name'=>'required',
'email'=>'required|email|unique:users,email',
'password'=>'required|min:6|confirmed'
]);
$user=User::create([
'name'=>request('name'),
'email'=>request('email'),
'password'=>bcrypt('password')
]);
$params = [
'grant_type'=>'password',
'client_id'=>$this->client->id,
'client_secret'=>$this->client->secret,
'username'=>request('email'),
'password'=>request('password'),
'scope'=>'*'
];
$request->request->add($params);
$proxy=Request::create('oauth/token','POST');
return Route::dispatch($proxy);
//dd($request->all());
}
}
and this is the login controller code :
public function login(Request $request)
{
$this->validate($request,[
'username'=>'required',
'password'=>'required'
]);
$params = [
'grant_type'=>'password',
'client_id'=>$this->client->id,
'client_secret'=>$this->client->secret,
'username'=>request('username'),
'password'=>request('password'),
'scope'=>'*'
];
$request->request->add($params);
$proxy=Request::create('oauth/token','POST');
return Route::dispatch($proxy);
}
so what should i change in the login method code so that not only it return the token_key and refresh token but also the user registration info it self like user name and email and password etc,
thks again bro :)