strongloop / loopback-component-oauth2

oAuth 2.0 server for LoopBack
http://www.strongloop.com
Other
62 stars 60 forks source link

allow sending in passport instance as option and export passport #78

Closed peterwillis closed 6 years ago

peterwillis commented 6 years ago

Description

Passport is designed to be modular, it's better not too assume this module will be initializing it unless you are giving it it's own instance by doing 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.

Related issues

Checklist

slnode commented 6 years ago

Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test."

dhmlau commented 6 years ago

@peterwillis , thanks for your contribution. Your code looks fine to me, however, I'm not familiar with this component to approve your PR. I can help you with the first few things:

slnode commented 6 years ago

Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test."