node-neo4j + passport

243 views
Skip to first unread message

Alex Frieden

unread,
Aug 24, 2014, 2:16:19 PM8/24/14
to node-...@googlegroups.com
Does anyone have any examples of integrating node-neo4j and passport.js together?  Currently having some trouble getting it working.  Thanks!

Evan Lee

unread,
Aug 30, 2014, 10:50:25 AM8/30/14
to node-...@googlegroups.com
Hey Alex,

I've worked with passport and node-neo4j. What sort of uses are you looking at? Any specific auth method for passport?

Alex Frieden

unread,
Oct 23, 2014, 2:28:21 PM10/23/14
to node-...@googlegroups.com
No, just trying to get a simple login to work in neo4j.  Do you have any examples I can follow?  Thanks

Dave Kushner

unread,
Oct 23, 2014, 11:10:34 PM10/23/14
to node-...@googlegroups.com
The authentication process is really no different with Neo4j than it is with any other database. Essentially the only difference will be how you serialize and deserialize the user. For the password validation process, refer to the Passport docs. The only thing that changes between the given example and your application is you would replace the User.findOne method with the corresponding node-neo4j method: db.getIndexedNode('Users', 'username', example, ...). Note that this example assumes you have indexed your "user" nodes by username, which I would highly suggest. 

Evan Lee

unread,
Oct 23, 2014, 11:12:42 PM10/23/14
to Dave Kushner, node-...@googlegroups.com
This is exactly correct.  Great description, Dave!
Reply all
Reply to author
Forward
0 new messages