Closed zarpelon closed 9 months ago
11.8.4
10.17.1
8.1
Postgresl 15
I defined the default guard as api in the passport.php settings.
When I try to use oauth/authorize, I receive that:
Install passport.
Set guard=api in passport.php
Try to use it:
Route::get("/redirect", function (Request $request) { $request->session()->put('state', $state = Str::random(40));
// Build the query parameter string to pass auth information to our request $query = http_build_query([ 'client_id' => 'my_id', 'redirect_uri' => 'my_url', 'response_type' => 'code', 'scope' => '', 'state' => $state, 'prompt' => 'consent', ]); // Redirect the user to the OAuth authorization page return redirect('http://localhost/api/v1/oauth/authorize?' . $query);
});
You don't need to change this. Just keep it as web.
Passport Version
11.8.4
Laravel Version
10.17.1
PHP Version
8.1
Database Driver & Version
Postgresl 15
Description
I defined the default guard as api in the passport.php settings.
When I try to use oauth/authorize, I receive that:
Steps To Reproduce
Install passport.
Set guard=api in passport.php
Try to use it:
Route::get("/redirect", function (Request $request) { $request->session()->put('state', $state = Str::random(40));
});