I’m going crazy with nodejs. I’m trying to realize the backend for a simple user management webapp powered by NodeJS, using Passport-Local and Sequelize libraries. Right now I just designed the user model. The main problem I have is that the signup process gives me an error: it looks like that I’m working on an undefined object. Could please someone
Tag: passport.js
Node + Passport, Error: Authentication strategies must have a name
I’m trying to initialize a SAML strategy during the require line. Something like this: but am getting the error: or TypeError: Cannot read property ‘name’ of undefined at Authenticator.use if a custom strategy name is not defined: passport.use(myStrat); . I’ve had it like this (which works): but I wish to change it because I need to call passport-saml’s Stragety.generateServiceProviderMetadata() function
how to delete cookie on logout in express + passport js?
I want to “delete cookies on logout”. I am not able to do that. I googled for answer and found following ways: Assign new date of expiration to cookie res.cookie(‘connect.sid’, ”, {expires: new Date(1), path: ‘/’ }); Delete cookie using below lines res.clearCookie(‘connect.sid’, { path: ‘/’ }); I tried both ways individually but they do not delete the cookie. Here
Using passport.js with multiple strategies without overwriting user request object
I’m using passport.js local-strategy for auth. I also need users to authenticate with Facebook, Twitter, and G+, but not as auth alternatives, but to enable the user to retrieve their content from those services. As written, each auth strategy writes a user object to the request object. This has the effect of logging-out my root user. Is there a way