Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arguments being passed are in incorrect order #75

Closed
reharik opened this issue Sep 16, 2016 · 7 comments
Closed

arguments being passed are in incorrect order #75

reharik opened this issue Sep 16, 2016 · 7 comments

Comments

@reharik
Copy link

reharik commented Sep 16, 2016

Hi, I have a login route and inside it I do
return koapassport.authenticate('local', function(err, user, info, status) {
when I log out the args ( on what should be a successful login ), user, info and status are all null, and err is equal to my user object.
I'm defining my local strategy just like in the examples. Not sure quite what's going on.
I've read through the source code for koa-passport and local-passport and don't see what's happening. I guess the next step for me is to dig into passport source call, because if I"m not mistaken you are internally handing the call back to the passport.authenticate method, so perhaps something has chnaged in there.
I'm using koa-passport 2.2.2
Thanks,
Raif

@rkusa
Copy link
Owner

rkusa commented Sep 18, 2016

I'll check that in the next couple of days. Thanks for reporting!

@rkusa
Copy link
Owner

rkusa commented Sep 27, 2016

So finally, I think this is the same issue as #69. That is, version 3.0.0-rc.1 should solve it?

@reharik
Copy link
Author

reharik commented Sep 27, 2016

well, not for me. I'm re-writing passport in a more functional less state driven, no callbacks kind of way. I just can't take it anymore. Almost done.
So I don't want you to take any action on my behalf.
Thank you,
R

@reharik reharik closed this as completed Sep 27, 2016
@rkusa
Copy link
Owner

rkusa commented Sep 27, 2016

Please keep us updated. Having a good less-hacky authentication solution for koa would be great!

@reharik
Copy link
Author

reharik commented Oct 25, 2016

Hey, I've published my promise driven authentication strategy framework. it's called papers, I have a koa-papers as well, because as you know what it passes to middleware is a bit different.
I currently have three strategies published ( only two anyone will care about, the third is LTI for LMS' ) local, and jwt.
It has pretty full feature parity with passport and is much cleaner code. The strategies are very easy to port, so if people want one of the existing strategies for passport they ( or I ) can port them to papers very easily.
I did not create the koa2 version because I was getting some strange behavior from babel when I compiled it, but I'm running it on koa2 with convert in my own projects. If you feel this is important I can figure it out, otherwise I'll wait till node 7 comes out.
Please let me know what you think and/or help me publicize this package. I don't really know how to get traction with it.
Thanks you,
Raif
https://www.npmjs.com/package/papers
https://www.npmjs.com/package/koa-papers
https://www.npmjs.com/package/papers-local
https://www.npmjs.com/package/papers-jwt
https://www.npmjs.com/package/papers-lti

@reharik
Copy link
Author

reharik commented Oct 25, 2016

will you look at that, I just noticed that node 7 was just released. I believe you have to use node --harmony-async-await flag though

@rkusa
Copy link
Owner

rkusa commented Oct 26, 2016

Hi @reharik thanks for the update! I never really did active promotion for NPM modules, but hackernews and reddit could work to get some initial momentum. I did a quick peak into your code. I would recommend to run some linting tools. E.g. you have some inconsistency when using var or const and there are also cases where you seem to use non of them making variables to pollute the global scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants