Closed peterwillis closed 4 years ago
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test."
@slnode test please
@strongloop/sq-lb-apex @bajtos , the PR sounds reasonable to me. May I get another review please?
I am not familiar with this code base at all. @raymondfeng could you please take a look?
I would like to add the tests, but oauth2-loopback.js has not been written in a way that makes it testable without mocking all of loopback. There are no tests for that file in the project at all at the moment.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS
file at the top-level of this repository.
Description
Passport is designed to be modular, it's better not to assume loopback-component-oauth2 will be initializing it unless you are giving it it's own instance using new passport.Passport(). This modification means you can pass in an existing passport that is assumed to be initialized, and then also export it so it can be modified. I know that passport is a singleton, but if you call initialize twice you can end up with bugs because there could be two instances flying around.
I have signed the CLA and the message is under 50 characters this time :-)
Related issues
Checklist