Closed ursuleacv closed 7 years ago
@ursuleacv
The oauth/authorize
route may be stripped from this package. The reason why I see in Lumen being an API-centric framework - the authorize
route basically only provides a frontend for confirming that the consuming application may access.
Furthermore I cannot see an authorize route in the Service Provider bundled with this package.
You need to remember that you should build a RESTful API with Lumen - frontend stuff is handled somewhere else.
That means I should have two apps, both including Passport. It doesn't really make sense to use Passport with Lumen.
@ursuleacv yes, it makes sense to have two apps - one is OAuth2 server itself, another one is a front-end app that uses its own OAuth client ID and secret. This is, in fact, the standard way to do it.
What Laravel Passport does by default is not the conventional way, Laravel just tried to make life simpler by combining OAuth server and client in one package :)
In any case, Lumen doesn't have sessions (on purpose) so /authorize links don't belong there, naturally.
When I redirect to oauth/authorize I get: Sorry, the page you are looking for could not be found.
In Passport documentation is saying to add
Passport::routes();
in
AuthServiceProvider
Because
How can I make it work? Where do I need to add Passport::routes();? I am using dusterio/lumen-passport