LaravelのPassportを使用してアプリケーションを作成しています。
クライアント側のアプリケーション(Laravel)のweb.phpから
Route::get('/redirect', function (Request $request) {
$request->session()->put('state', $state = Str::random(40));
$query = http_build_query([
'client_id' => '1',
'redirect_uri' => 'http://localhost:8001',
'response_type' => 'code',
'scope' => '',
'state' => $state,
]);
return redirect('http://localhost:8000/oauth/authorize?'.$query);
});
とoauth/authorizeにリダイレクトしています。
するとAPI側のアプリケーション(Laravel)でRoute [login] not defined. (RouteNotFoundException)が出力されてしまいます。
リクエストの方法が根本的に間違っていますでしょうか?
教えていただきたいです。