senecajs / seneca-auth

A Seneca user authentication plugin for Hapi and Express
http://senecajs.org
MIT License
33 stars 29 forks source link

seneca plugin init rules are stricter for seneca 0.6+ #43

Open rjrodger opened 9 years ago

rjrodger commented 9 years ago

only call seneca.act within init action (seneca.add("init:auth", ...))

https://github.com/rjrodger/seneca-auth/blob/0.5.0/auth.js#L183

mirceaalexandru commented 9 years ago

This is a special case, I cannot call that seneca.act inside the init action of seneca-auth.

The init for seneca-auth will be called when seneca-auth is initialised.

But after that the seneca-auth-local / seneca-auth-facebook or other seneca auth strategies plugins are loaded and as part of that operation the strategy plugin must register itself to seneca-auth for being used properly.

At the moment of registration the GET endpoints for: