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

Local password authentication. #258

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Local password authentication. #258

wants to merge 1 commit into from

Conversation

agkunz
Copy link

@agkunz agkunz commented May 8, 2012

Hello, my first open source commit (attempt!).
I've been using everyauth for a few weeks now and it's been quite useful!
While using the password authentication scheme, I still wanted to be able to pull information about the user. However, none of the information that was automatically retrieved from the other authentication schemes (ex, I tested with Twitter) was accessible.
Upon reading the source I found that the sessions .userId was being hard set to an expected user.id (or apparently in a later push, a configurable primary key).
Here was my solution to the problem anyway- if the user is available, we should push all the fields we have into the session. (In my case, I chose to exclude the 'salt' and 'hash' fields for my users passwords, this should probably be set up to be an configurable exclusions list).

…sion (sans salt and hash fields). This is instead of having a hard-coded .userId field and having only it and .loggedIn be returned.
@guaka
Copy link

guaka commented Jun 6, 2012

I've barely started with node.js, but this patch seems to make a lot of sense to me.

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

Successfully merging this pull request may close these issues.

2 participants