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 .
The dependet package MoeenBasra\LaravelPassportMongoDB in version 1.0.18 does not set the encryption key for the Oauth agent, generating the following exception:
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 .