Northern-Moose / nite-out

0 stars 2 forks source link

Make sessions more robust #20

Open seanchen1991 opened 10 years ago

seanchen1991 commented 10 years ago

If a user has logged in, they do not need to log in again upon page refresh. However, their name is not displayed in the welcome message in the top right corner. Not sure if sessions ever timeout or just remain indefinitely.

sputh commented 10 years ago

you can set the session timeout time somewhat like this: app.use(session({secret: '123Secret', cookie: {maxAge: 60000}})); where age is in ms

sputh commented 10 years ago

will be handled on the server side. Will be using tokens instead of sessions because angularjs likes tokens and it allows for mobile integration

sputh commented 10 years ago

We are now considering adding any event in the cart to our purchase history database with a new column "open/close or purchase status". If an item gets "checkout" then, it will close, otherwise, it will remain open

sputh commented 10 years ago

Add zip code to token, working on storing token into a cookie so that whenever user info is being called on the client side, it will refer to the cookie rather than the token

sputh commented 10 years ago

will be using localStorage instead of cookies as it is just as persistent, more secure and better supported across different platforms

sputh commented 10 years ago

Adding feature: default username is set to "Guest" and username is stored as $localStorage

sputh commented 10 years ago

Need to change userLogin to POST request rather than GET requests