feathersjs-ecosystem / authentication-local

[MOVED] Local authentication plugin for feathers-authentication
https://github.com/feathersjs/feathers
MIT License
26 stars 15 forks source link

Strategy for subapp #9

Closed anrn closed 7 years ago

anrn commented 7 years ago

If I try to use app.configure(local()) strategy in subapp (not in root app) it doesn't register strategy. You can make it directly — app.passport.use( new LocalStrategy ... even in subapp and it's working, but I'm not sure it's right way.

buske commented 7 years ago

After running into a similar problem and asking on the slack channel, the answer was to call subapp.setup(app) in the root app, as per: https://docs.feathersjs.com/middleware/mounting.html#sub-apps

ekryski commented 7 years ago

@anrn that is the way to do it, however we're also going to start to discourage the use of sub-apps as we push towards Feathers v3 and de-couple from Express.

Going to close this but let us know if that doesn't work and we can revisit the issue.