cookies - User registration and logging in a server for Node.js. -


i starting take on rather ambitious project (for level of web programming experience). suffice level of web programming in rather minimal. understand basic html/css/js. rather going learn beginning want project , learn go. chose use node.js little familiar js.

so first step in endeavor make user registration , log in system. want following:

  1. create system user register entering email , password
  2. automatically log user in next time accesses site
  3. persistent log in within session

i asking examples or tutorials regarding node.js. know have start beginning appreciate help.

some fundamentals need learn are:

  1. how user automatically logged in when visiting url. example, when go gmail.com in browser, directly takes me inbox. how user information passed computer server?

  2. how usernames , passwords received , checked in server side? node provide assistance in doing this?

i assume these questions understand level of web programming , appreciate in getting started. book recommend, tutorial, anything.

thank , hope wont closed nonconstructive.

for user authentication system can use passport.js.

regarding logging in when user comes later, need use session , better consistency, can shared session storage. here article that.

if have shared session, many services store session there, able restore session , authentication data.

session using cookies (usually), , 1 of important data used in order restore session id, in same time there more (browser data, end point (ip)), still reliable, , stealing cookies - not allow someones session easily.

in order keep "remember me" login system, need reliable , long lasting sessions on server side, expire in 7 days after last activity or so. means session should lightweight, , store important data. same time can have many levels of data stored different expiration times.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -