dusterio / lumen-passport

Making Laravel Passport work with Lumen
MIT License
654 stars 139 forks source link

Support client UUIDs #137

Closed chris-doehring closed 3 years ago

chris-doehring commented 4 years ago

Hi there,

Passport version 8.5 introduced the support for client UUIDs instead of the default numeric IDs. I was interested to use this feature so I tried it in my Lumen app. Unfortunately, due to the nature of Lumen, the config flag to activate this option had to be manually activated in your service provider, because it ignores the manually configured Lumen config files in the original one.

In addition to that, there are some further adjustments one has to do in order to make it compatible with Lumen, so I adjusted the readme file.

ODGodinho commented 4 years ago

Hello I was having a problem, I am converting my laravel application to Lumen and I realized this error, even creating the Passport settings and adding it to app.php did not work, fortunately I found that it can help ..

Add to "\App\Providers\AuthServiceProvider" or in your registered provider file:

\Laravel\Passport\Passport::setClientUuids(true);

I put below: \Dusterio\LumenPassport\LumenPassport::routes($this->app); \Dusterio\LumenPassport\LumenPassport::allowMultipleTokens();

@chris-doehring chris-doehring

chris-doehring commented 4 years ago

Hi @ODGodinho,

of course, adding the setClientUuids(true) call to a custom service provider will solve the issue. At the end, I solved it the same way. I just thought that the purpose of this package is to integrate the Laravel Passport for Lumen, and as the UUID feature is part of Passport today, I thought it might be very nice if this integration package will also support it by default.

This PR is just a "nice to have". I created it, because it feels strange that it's necessary to create just another service provider to be able to use a default Passport feature.

chris-doehring commented 3 years ago

@dusterio Any interest in supporting this feature? If not, you can close this pull request or I will do it in the next days/weeks.

chris-doehring commented 3 years ago

I guess there is nothing happening in ths pull request anymore. Therefor I will close it.