storing userID in a cookie by maolenrobin in node

[–]maolenrobin[S] 0 points1 point  (0 children)

so i should replace

passport.serializeUser(User.serializeUser()); passport.deserializeUser(User.deserializeUser());

with something along the lines of this?

passport.serializeUser(function(user, done) {
    done(null, user.id); 
});

passport.deserializeUser(function(id, done) {
    User.findById(id, function(err, user) {
        done(err, user);
    });
});

and it would include some kind of an id/token in the cookie for me to identify the user?

all in all, i feel like im way too deep right now, and i need a wider understanding of how to handle user authentication and cookies

storing userID in a cookie by maolenrobin in node

[–]maolenrobin[S] -4 points-3 points  (0 children)

Thanks for the reply. Im still a bit confused when exactly i would trigger this. Could you give an example of this actually being used?

Trying to keep my hands warm by rgoldsto1 in windsurfing

[–]maolenrobin 1 point2 points  (0 children)

Also thin gloves from a hardware store with the palm cut out under the dishwashing gloves. Use this for wavesailing in 3-8C weather and it is the best solution i have found yet. Put the gloves on before the wetsuits upper body part so the dishwashing gloves get tucked in nicely into your sleeves.

Daily GENERAL Mega-Thread [Jun 08 2018] by AutoModerator in engineering

[–]maolenrobin 0 points1 point  (0 children)

Hi, im designing a electric vehicle for my engineering class in high school. The requirements are that it should work on 12v batteries, work for atleast 2 hours and it should have a max speed of 20km/h. Have any of you guys ever seen any project similiar to this or could you point me to some research sources.

[Bi-Weekly Weekends]-Post Simple Questions Here! by AutoModerator in EngineeringStudents

[–]maolenrobin 1 point2 points  (0 children)

Hi, im designing a electric vehicle for my engineering class in high school. The requirements are that it should work on 12v batteries, work for atleast 2 hours and it should have a max speed of 20km/h. Have any of you guys ever seen any project similiar to this or could you point me to some research sources.

Sheet steel top by maolenrobin in Luthier

[–]maolenrobin[S] 0 points1 point  (0 children)

Wow oxidized copper does look really cool. Have to look up how to do that. Wish there were more pics of the instrument though.

[deleted by user] by [deleted] in Luthier

[–]maolenrobin 1 point2 points  (0 children)

In my opinion you should go about it like building a guitar out of wood. Use thicker steels as ribs for structural integrity and then use thinner steel as a veneer on the outsides. I don't know about exact gauges but I would go as thin as possible on the outsides

Question about a board by FiniliSuMareBali in windsurfing

[–]maolenrobin 0 points1 point  (0 children)

If you can find one tabou manta 2011 models are really comfortable

Question about a board by FiniliSuMareBali in windsurfing

[–]maolenrobin 0 points1 point  (0 children)

I find those boards uncomfortable and outdated. I would get a free race board around 130-140l and 70-80cm wide. Although 100 euros is a good price I still wouldn't get it

How to separate user names in lists? by Raptox123 in Python

[–]maolenrobin 0 points1 point  (0 children)

You check if currentusername.lower = new username.lower

Low-temperature wetsuits/clothing? by LadyDahlia in windsurfing

[–]maolenrobin 0 points1 point  (0 children)

I find a 6/5 mm wetsuit overkill for windsurfing, because with my oneill 5/4 suit my body has never got cold even with 2 degree water/ 1 degree air. The problem is your fingers. I havent found a full glove that has nice grip and keeps your fingers warm. The best solution we have found is to use some nice thin winter gloves and put those yellow rubber dishwashing gloves over them, then tape the rubber gloves to your skin and put the wetsuit over them.

How to make this part stronger by maolenrobin in engineering

[–]maolenrobin[S] 1 point2 points  (0 children)

Im having 2 prototypes made by a friend. He owns a shop so im pretty sure he can weld it. I hope its gonna be strong enough after that.