All of configuration is right, but does not work.
My controller code is:
$appUser = User::create([
'name' => $user->name,
'email' => $user->email,
'password' => Hash::make(Str::random(8)),
]);
return $passportToken = $appUser->createToken('Token Name')->accessToken;
and response code from this URL (http://localhost:8000/api/authorize/github/callback?code=6ba82d59f00fdb1ad5c9) is:
{
"name": "Token Name",
"abilities": [
"*"
],
"tokenable_id": 1,
"tokenable_type": "App\\Models\\User",
"updated_at": "2021-09-19T05:10:00.000000Z",
"created_at": "2021-09-19T05:10:00.000000Z",
"id": 3
}