Closed mcdonnelldean closed 8 years ago
@mcdonnelldean looks like auth needs to be updated to export a preload
function:
module.exports.preload = function () {
return {
name: 'auth'
}
}
@geek
I moved all required code into init function that now is something like this:
........
seneca.add('init: auth', init)
return {
name: 'auth'
}
}
This was a fix but most important - and the reason for the above error - is that now I used seneca.ready() like this:
seneca.use(AuthToken, internals.options)
seneca.use(AuthUrlmatcher, internals.options)
seneca.use(Utility, internals.options)
seneca.use(UserManagement, internals.options)
seneca.use(AuthRedirect, internals.options.redirect || {})
seneca.ready(function(){
seneca.use(HapiAuth, internals.options)
seneca.use(LocalStrategy, internals.options)
})
Because I need to be sure that before HapiAuth & LocalStrategy are loaded all other plugins are fully initialized. Please let me know if it is a correct approach.
@geek this is fixed with latest PR being merged into master.
@mirceaalexandru do you have a link to the PR ?
@geek, is now merged into master, just minutes ago.
@geek @mirceaalexandru Let me know when this is all on releases and I will update Vidi
@mcdonnelldean you can use for now master from seneca-auth, not from my account. There are two issues to be fixed, then I think we can publish it.
We can close this
@geek Updated to Chairo 2.0, now none of my auth stuff is working, detail below,
If I remove the auth stuff chairo works ask expected so I think the issue is either in
seneca-web
or the auth related plugins. @mirceaalexandru as has a number of branches outstanding forseneca-auth-*
.Some combination of branches has worked but now I can't be sure. Can we get some eyes on this as priority? This is my script,
Note: By commenting out the lines above chairo works but now I am missing my auth. Also I'm not using Concorda in this instance, it's just
auth
,user
, and local login.