Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it still valid for use for today's standards ? #48

Open
VasilisKosmas opened this issue Jul 14, 2017 · 6 comments
Open

Is it still valid for use for today's standards ? #48

VasilisKosmas opened this issue Jul 14, 2017 · 6 comments

Comments

@VasilisKosmas
Copy link

VasilisKosmas commented Jul 14, 2017

Is this code still valid and relatively secure for using it today, considering that 4 years have passed since it's been published ?

Any extra advice or footnote ?

@VasilisKosmas VasilisKosmas changed the title Is it still valid ? Is it still valid for use ? Jul 14, 2017
@VasilisKosmas VasilisKosmas changed the title Is it still valid for use ? Is it still valid for use for today's standards ? Jul 14, 2017
@tech-alchemist
Copy link

No. few npm module versions are outdated w.r.t syntax in this repo.

@natoine
Copy link

natoine commented Aug 30, 2017

Guys, this code needs only few updates to be valid.

Take latest version of npm modules
You will have to change few things for Mongoose :
in server.js : mongoose.createConnection(configDB.url)
instead of mongoose.connect(configDB.url)
in User.js :
var configDB = require('../../config/database.js')
var db = mongoose.createConnection(configDB.url)
module.exports = db.model('User', userSchema)
instead of :
module.exports = mongoose.model('User', userSchema)

And it's allright for local.

For Facebook :
in passport.js :
passport.use(new FacebookStrategy({

    // pull in our app id and secret from our auth.js file
    clientID        : configAuth.facebookAuth.clientID,
    clientSecret    : configAuth.facebookAuth.clientSecret,
    callbackURL     : configAuth.facebookAuth.callbackURL,
    profileFields: ['id', 'displayName', 'link', 'about', 'emails']

},

You only need to add the profileFields

Don't have tried the twitter and google auth right now but will do soon.

@sevilayha maybe you can make a little update of this code ?

@Mydayyy
Copy link

Mydayyy commented Sep 24, 2017

Hi,

no, this is not secure at all.

Please read my issue for further information.

#51

@natoine
Copy link

natoine commented Sep 25, 2017

Hi Mydayyy

could you be more precise and explain a bit more what changes should be done il the actual project ?

Maybe give some references about good practices ?

Thank for your time.

@Mydayyy
Copy link

Mydayyy commented Sep 29, 2017

Hi @natoine,

I updated my original issue and went a little bit more indepth about the security problem here.

#51

~Mydayyy

@EddieOne
Copy link

Since this was made for express 3, it's overly complicated in express 4. Skipping passport and using middleware is the way to go if you ask me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants