Comments (6)
More info - my req.session after a successful facebook authentication looks like this:
{
"lastAccess":1303841289370,
"cookie":{
"originalMaxAge":14400000,
"expires":"2011-04-26T22:07:38.878Z",
"httpOnly":true,
"path":"/"
},
"auth":{
"facebook":{
"user":{
"id":"610771581",
"name":"Jason Bond Pratt",
"first_name":"Jason",
"middle_name":"Bond",
"last_name":"Pratt",
"link":"http://www.facebook.com/jasonbondpratt",
"username":"jasonbondpratt",
"hometown":{
"id":"107442005952063",
"name":"Hartford, Michigan"
},
"location":{
"id":"110184922344060",
"name":"Washington, District of Columbia"
},
"gender":"male",
"email":"[email protected]",
"timezone":-4,
"locale":"en_US",
"verified":true,
"updated_time":"2011-04-16T22:09:12+0000"
},
"accessToken":"XXXXXXXXXXXXXXXXXXXXX"
},
"loggedIn":true
}
}
from mongoose-auth.
Rolling out a req.user accessor within the hour. Stay tuned.
from mongoose-auth.
npm install the latest v0.0.6
From your express server code, you now will have access to req.user
From your express views, you now will have access to both
everyauth.user
user
which equivalently return the mongoose User document associated with the current session
from mongoose-auth.
AWESOME.
from mongoose-auth.
This is great - originally I had some problems, as I missed the update in everyauth that requires the findUserById function to be defined, works great now. That being said - maybe mongoose-auth could provide that definition by default, since it has access to the User model (via it's configurable User function) and knows that it's using Mongoose. Anyway just an idea.
from mongoose-auth.
mongoose-auth does provide a default findUserById definition. If you check the README, you do not have to define findUserById for mongoose-auth, since it does it for you automatically.
from mongoose-auth.
Related Issues (20)
- Doesn't install out-of-the-box on Windows (without cygwin) HOT 3
- Is this project still being maintained? HOT 8
- problem installing mongoose-auth on Mac OSX HOT 3
- routing with password authentication?
- Cannot find module 'bcrypt' in nodejs application ? HOT 1
- How do I fix this? getAccessToken of `twitter` module timed out.
- mongooseauth cant install in Windows npm HOT 1
- Node 0.8.0, OSX, bcrypt installs but won't load, wrong architecture HOT 2
- Not able to register new user HOT 1
- Examples on the site incompatible with the latest version of express
- Error with everyauth after 0.3 version update HOT 8
- "everyauth is not defined" error when using view helpers HOT 1
- Installation fails on Linux64 HOT 2
- Where I can found the createWithFB method described on the README.
- Broken out of the box.
- Workin example in Rails
- Error on running example
- Error running example HOT 3
- Don't create a session after registering HOT 2
- problem with loginWith
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongoose-auth.