strongloop / loopback-example-passport

LoopBack example for facebook login
Other
185 stars 134 forks source link

Standalone passport without passport-loopback component #80

Closed hackerunet closed 8 years ago

hackerunet commented 8 years ago

Is possible to configure and use a secondary authentication method as standalone and keep token based API requests as originally offer loopback? In order to achieve this I need to customize the routes but is possible to pass passport as parameter to routes.js from boot scripts?

bootOptions = { "appRootDir": __dirname, 
                "bootScripts" : [ "/full/path/to/boot/script/first.js", "//full/path/to/boot/script/second.js", ... ] };
boot(app, bootOptions);

That's what loopback documents say about bootscripts so I need to load /boot/routes.js passing app and passport objects initialized in server.js how can I achieve this using bootscripts auto loading? regards

hackerunet commented 8 years ago

already fix this, excluded the script from boot and called it by hand passing the required app and passport objects.