-
-
Notifications
You must be signed in to change notification settings - Fork 500
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
Another~Another only missing credentials problem:D #163
Comments
Were you ever able to fix this? |
Another one banging the head against the wall... |
Good Question! @MauriceMorrey @Croma1994 So far I don't want to spend too much time finding it on my repo, but if we have too many people have this issue, I may find it, test it, and debug it. So far I don't want to spend too much time on Web things but in Deep Learning. |
So far, in my case was just passing this into the local strategy because I had custom named fields...
|
@Croma1994 does it work? If it works, it is great. |
@JonathanSum Yep! I had a misconception, thought that the local strategy function searched automatically for the req.body payloads no matter what name attribute they had, but you have to pass that object specifying the name and passing the req to the callback in order to use flash messages. |
Didn't work for me, i have been banging my head for 3 days? |
Also same issue Missing credentials passport.use('local.signup', new LocalStrategy({ Which I followed from http://www.passportjs.org/docs/username-password/ |
I don't quite remember the fix but it had something to do with passing parameters named differently; in the documentation link @jefflaub12 shared, it says; "By default, LocalStrategy expects to find credentials in parameters named username and password. If your site prefers to name these fields differently, options are available to change the defaults." I know it says you have the option to change defaults but if I remember correctly, using the defaults fixed the issue for me. Good luck. |
That did it used the defaults instead of attempting to rename the variable for usernameField. Thanks |
Is this part, which in the passport.js, wrong?
passport.js
user.js
app.js
One more thing, this database.js file is in the config folder
what des the variable secret for? People say it can be anything.
database.js
The text was updated successfully, but these errors were encountered: