kayrules / lumen-passport-mongodb

Making Laravel Passport work with Lumen
MIT License
6 stars 7 forks source link

Lpm references #6

Closed lucascardial closed 5 years ago

lucascardial commented 5 years ago

The dependet package MoeenBasra\LaravelPassportMongoDB in version 1.0.18 does not set the encryption key for the Oauth agent, generating the following exception:

You must set the encryption key going forward to improve the security of this library - see this page for more information https://oauth2.thephpleague.com/v5-security-improvements/

I tried to send a PR to the original repository, but without success. So I cloned TAG / 1.0.18 and refactored the Authorization Server generation to set the OAuth agent with the encryption key for token generation.

I removed the moeen-basra / laravel-passport-mongodb dependency forlucas-cardial / laravel-passport-mongodb.

Now it's working. I can generate tokens and make all the normal Laravel Passport flow.

You can accept this my PR or you can try to update the dependency of moeen-basra / laravel-passport-mongodb to version 4.0, which corrects the problem, although in my case it has generated other problems regarding the primary key integrity in MongoDB .

lucascardial commented 5 years ago

Any positioning on this PR?

kayrules commented 5 years ago

Hi @lucca-cardial PR merged. Sorry, I couldnt actively maintain this repo anymore. feel free to collab or fork into your own repo.