codeforamerica / bestnest-api

http://bestnest-api-dev.herokuapp.com/
4 stars 2 forks source link

sessions and users #63

Open junosuarez opened 10 years ago

junosuarez commented 10 years ago

users get a session upon first coming to site users can authenticate with a name and an email address userId stored with all user-submitted content (comments/reviews, structured content, etc)

junosuarez commented 10 years ago

for now I stubbed out a req.userId property in the http module.

junosuarez commented 10 years ago

store user sessions in primary db. for now, we don't need to add any additional infrastructure like redis.

create a new sessions collection. sessions object:

{
  _id: String,
  userId: String,
  created: Timestamp,
  lastSeen: Timestamp
}