How to Build User Login System Using Nodejs | Nodejs & its Installation
VloĆŸit
- Äas pĆidĂĄn 14. 07. 2017
- In this tutorial, you will learn how to build a User Login System using Nodejs & the installation process.
Learn Programming, anywhere anytime starting at just - bit.ly/Programming19
The video contains:
1. NodeJs & its installation
2. Project Intro
3. Getting Started With MongoDB Part A & Part B
4. App & Middleware Setup
5. Views & Layout
6. Register Form & Validation
7. Models & User Registration
8. Password Hashing with BCrypt
9. Passport Login Authentication
10. Logout & Access Control
11. Quiz Time.
Get Our Bestselling Paid Courses For Free!
Projects in MongoDB - Learn MongoDB Building Projects - bit.ly/42IxSWa
The Full Stack Web Development - bit.ly/3pO6S9r
Learn To Create WordPress Themes By Building 10 Projects - bit.ly/3pQC9bS
Projects In Laravel: Learn Laravel Building 10 Projects - bit.ly/3Mxs8sJ
Learn Machine Learning By Building Projects - bit.ly/3Myw3Wk
Get Yourself Any Course Of Your Choice For Free
{Use Coupon Code: YTBFREE}
Explore Our All Courses - www.eduonix.com/courses?track...
đEnjoy Extra 50% off on the Below E-Degrees with certification - (APPLY COPOUN - COL50)
đčAI & ML E-degree- bit.ly/2mEUCYC
đčMERN Stack Developer E-Degree Program - bit.ly/2pFSz7J
đčDevOps E-degree - bit.ly/2J6Gf7u
đčCloud Computing E-Degree - bit.ly/2Hyv5dO
đčCybersecurity E-Degree - bit.ly/2Hyv5dO
đčIoT E-degree - The Novice to Expert Program in IOT - bit.ly/3dTtSJP
đčAdvance Artificial Intelligence & Machine Learning E-Degree - bit.ly/336NwOU
â â â The Best courses & Bundles to do with Eduonix with Flat 50% OFF â â â ( APPLY COUPON - COL50)
1.Learn Machine Learning By Building Projects - bit.ly/2MxMSSl
2.The Complete Web Development Course - Build 15 Projects - bit.ly/32Ah9oW
3.The Full Stack Web Development - bit.ly/2MZDBRV
4.Projects In Laravel : Learn Laravel Building 10 Projects - bit.ly/2MAiHtH
5.Mathematical Foundation For Machine Learning and AI - bit.ly/2N23Eb1
1.Mighty Digital Marketing Bundle - bit.ly/2X3xK3U
2.AI and Machine Learning Guru - bit.ly/3okSbFG
3.Game Development Masterpack - bit.ly/3mdTSTk
4. Mighty Web Development Bundle 2.0 - bit.ly/3ouO3TA
â Get Exclusive Flat 30% off on Our Lifetime membership - bit.ly/3dO6oGc ( APPLY COUPON : YTLIFE30)
#django #eduonix #elearning
Thank you for watching! Weâd love to know your thoughts in the comments section below. Also, donât forget to hit the âlikeâ button and âsubscribeâ to âEduonix Learning Solutionsâ for regular updates.
bit.ly/2ITJDQb
Follow Eduonix on other social networks:
Facebook: goo.gl/ZqRVjS
Twitter: goo.gl/oRDaji
Instagram: goo.gl/7f5DUC
Linkedin: goo.gl/9LLmmJ
Pinterest: goo.gl/PczPjp
This video probably saved me 20 hours of research, amazing job
Glad to hear that! Stay connected & Subscribe!
thanks for this explanation it's great for me but what if I want to make the same with a popup window
This is the BEST Nodejs authentication tutorial. Thanks! :)
We are so glad we could help! Subscribe for more tutorials!
Thanks for the awesome tutorial.
You're Welcome !! Subscribe for more.
Learnt a lot. Thanks !
Weâre glad the video was helpful to you. Subscribe to us for the latest updates.
This is a great tutorial, thank you
Hi Abraham, we're glad you liked it. Subscribe for more!
Is there a video that continues on this one? I'm trying to show all the users trough a loop and have the profile pictures shown. Thing is, i am familiar ejs, not pug...
Hello, is it possible to create a student portal/management system using Node.js? I've been looking all over youtube for something like this
Trying to watch this because it looks like a good video. Timestamps would be really helpful though since it is a large video and I dont need all of it.
hey, i can't use rest command cuz it's deleted on never version. do you have any suggestions for it?
Do you have more content following that project? I'm no ready to continue =/
hi brad, I just want to ask if is adding too many packages recommended when building apps?
Great content! Since I am kinda noob with the terminal ( and believe not alone) , it took me some time to find out how to restart the npm. It is done with 'Ctrl' + 'C' in the terminal. It may be simple, but it took me some time. Hope it helps somebody. :)
Thank you for your valuable insight Nas. Subscribe for more tutorials!
You can use nodemon and it will restart on it's own every time you edit something in the sever file.
Frederick Lowe Yes! Discovered it 1 day after the comment! Thank you for the info! :)
thanks, how to view profile page then?
Thank you for this great tutorial
Hi, thanks for the awesome tutorial, my requirement is like, need to build the Ionic app with signup and login, how can we replace the 'view layout' with our ionic app..?..can somebody help me on this.
thanks in advance
learn to code before trying to do something complicated
i suggest learning html & css
CAN YOU CREATE A SEPERATE DB/COLLECTION FOR EVERY USER WHO REGISTER???
wow! Traversy Media
YES IT IS MR. brad,,,...........
yh i noticed the voice
shh quiet hha
Thought im the only one who heard the voice
can you provide layout.jade boilerplate that you have used in this tutorial?
gist.github.com/harsha547/20d1062e3318a195a9b4bfeb9d958133
To download resource file please click on below link it may help you
content.eduonix.com/Projects-Using-Nodejs-Updated/resources/LogoutandAccessControl.zip
i am not getting the request value from registration form as a test on my console. i think i am having issue with body-parser..
can anyone tell me how to fix it?
To download resource file please click on below link it may help you
content.eduonix.com/Projects-Using-Nodejs-Updated/resources/LogoutandAccessControl.zip
ExpressValidator (not a function error).. How do i get pass this..?
having a hard time applying req.flash('success', 'you are now logged in'); in my index.ejs file. i've been using ejs instead of jade. i know you used != messages() that doesn't work for me in ejs not really sure how to, please help.
thank you
gist.github.com/brianmacarthur/a4e3e0093d368aa8e423 this helped me get it working
in your middleware add
app.use(function (req, res, next) {
// if there's a flash message in the session request, make it available in the response, then delete it
res.locals.sessionFlash = req.session.sessionFlash;
delete req.session.sessionFlash;
next();
});
your EJS should look like this
0 ) { %>
FLASH!
FLASH!
barrard thank you so much for the reply. I figured it out a while back but I really appreciate the help. This is why I love the coding community.
Is there any way to get the details of the user that is currently on the members page after successfully logging in? Like lets say I want to display their name and photo on the page like a profile. Is there any way to get that info in the layout.jade file?
Awesome tutorial by the way it was incredibly helpful!!
Refer to link mentioned below to get an idea about your query
blog.couchbase.com/creating-user-profile-store-with-node-js-nosql-database/
Hello...if i want to make a app which communicates with a server and write all the data from the app in a mongodb database...do i need to install mongodb on the server or i install it only on the developing pc and send all the created data to the server ( after i finished with developing)? Thx
You need to install MongoDB on your developing pc
not workig with new updates, someone can help with that ?
Is this video documented anywhere ?
why my ls after mongodb wont work?
Hi! Everything worked for me except for the very end. The isAuthenticated() function did not work for me. It is always false, even when I login. This was a GREAT tutorial overall. And the BEST explained tutorial I could find. Thanks! :)
Thank you so much! We're glad we could help! We will forward your issue to our support team and see if they can figure out a solution, meanwhile it'd be great if you could subscribe to our channel!
Hi! Sorry, my bad, I had miswritten the session code. I fixed it now! Thank you so much! I subscribed :)
How did you fix this issue? I'm having the same one. My ensureAuthenticated() for isAuthenticated is always false when logging in.
It was basicly that the session in app.js was not saving the user. I think if you have this code in app.js:
app.use(session({
secret:'secret',
saveUninitialized: true,
resave: true
}));
app.use(passport.initialize());
app.use(passport.session());
Then it should work.
If you have that code and it does not work, please reply back. Also if you do reply, can you send me what order you put them in? You should put your session first, then passport.initialize, and then passport.session. Hope that helps! Thanks :)
In my case I had forgotten to put () after req.isAuthenticated
req.checkBody() used for get template input name .how should i apply this for when server(Express) and client(Vuejs) is different or is there are any method to validate req.body.* in server side
REPLY
Check below link it may help you stackoverflow.com/questions/17628206/validation-in-express-validator
My navbar is a grey button with a drop down menu, it may be because i downloaded a later version of bootstrap?
I am also not getting the console text when I test req.body.name (may be because I cannot use favicon? throws error when I include that package )
Its version issue. Please use the version of bootstrap as per use in the video.
you can use resource file please click on below link it may help you
content.eduonix.com/Projects-Using-Nodejs-Updated/resources/LogoutandAccessControl.zip
well that - -rest - -install is not working in terminal and even net start MongoDB is not starting the services
what can i do??
remove --rest it isnt a feature anymore. just do --install and it should work fine
how to avoid duplicate username in register
I'm havin an issue with bootstrap css & js:
Failed to load resource: net::ERR_FILE_NOT_FOUND style.css:1
Failed to load resource: net::ERR_FILE_NOT_FOUND bootstrap.js:1
I've tried using multiple bootstrap links for both css and js. Do you have any suggestions? I'm also getting these errors from Git Bash terminal:
GET /register 500 3.842 ms - 1880
GET /register 200 41.893 ms - 995
GET /stylesheets/bootstrap.css 304 0.864 ms - -
GET /stylesheets/style.css 304 0.823 ms - -
GET /javascripts/bootstrap.js 304 0.461 ms - -
GET /users/register 200 30.198 ms - 995
GET /stylesheets/bootstrap.css 304 0.874 ms - -
GET /stylesheets/style.css 304 0.870 ms - -
GET /users/javascripts/bootstrap.js 404 26.721 ms - 2408
GET /register 304 23.650 ms - -
GET /stylesheets/bootstrap.css 304 2.784 ms - -
GET /stylesheets/style.css 304 1.205 ms - -
GET /javascripts/bootstrap.js 304 0.638 ms - -
GET /users/login 200 30.184 ms - 980
GET /users/javascripts/bootstrap.js 404 23.459 ms - 2408
GET /stylesheets/bootstrap.css 304 0.695 ms - -
GET /stylesheets/style.css 304 0.917 ms - -
GET /users/javascripts/bootstrap.js 404 17.479 ms - 2408
How to retrieve & display the image ? Used the below code the path localhost:3000/uploads/ gives 404. though I can see the files under my Projects/nodeauth/uploads
.media
img(src='./uploads/'+'#{user.profileimage}')
Please refer the link below is may help you:
stackoverflow.com/questions/32646651/cannot-get-image-on-localhost
i am trying ti build the project using electron-package, I downloaded the electron- package through npm i electron package --save but when i run npm build it gives me some errors, can you tell me how to do so, or can you make a new video talking about building this project into an application
May I know what error are you facing?
sorry for being late with my reply but I was busy with my exams and you know......, so the kind of error is like this:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nodeauth@0.0.0 build: `electron-packager . anasss`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodeauth@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Omega\AppData\Roaming
pm-cache\_logs\2018-05-28T19_53_19_370Z-debug.log
I think this error is coming because in the package.jason we are using ./bin/www as start so it will not work is this right.
Can you give me a solution?
also Can you show us how to connect this project to mlab since i need it to be an online application not just a LAN database.Thank you.
--rest commend is not available in new version of mangodb , what should i do ? what --rest commend exactly does ? what commend should i use instead of that ?
Check the link below it may help you
stackoverflow.com/questions/13553623/where-should-i-add-the-rest-option-for-mongodb
stackoverflow.com/questions/47983629/error-parsing-command-line-unrecognized-option-rest?rq=1
docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/
Sir, can you help me out? i am facing errors for MongoDB... its not working, my mongo shell is not connecting
What error are you getting?
use mongo 3.2.3
Port 3000 is already in use
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nodeauth@0.0.0 start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodeauth@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Annie\AppData\Roaming
pm-cache\_logs\2019-01-03T02_03_09_406Z-debug.log
getting this error when i try to npm start.Please help
hey, I am able to register the user but when I try to login nothing happens. It shows you are logged in when not using ensureauthenticated function but returns null when that is applied and also I don't get any error message for wrong logins.
To download resource file please click on below link it may help you
content.eduonix.com/Projects-Using-Nodejs-Updated/resources/LogoutandAccessControl.zip
Hi, I am actually getting this error near the end of the code, when implementing the login part of the code. 43|
44| .container
> 45| != messages()
46| block content
47| script(src='ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js')
48| script(src='javascripts/bootstrap.bundle.js')
in jade. Can you help me understand what is going wrong, I thoroughly checked the entire video to make sure I didn't have any typos also.
It is saying messages is not a function.
script( src='//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js' )
script( src='//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js' )
script(src='javascripts/bootstrap.js')
remove that line and use this one
where did you get layout code?
and It does not work for me after downloading bootstrap
Use cdn or download bootstrap 3.3.6 from blog.getbootstrap.com/2015/11/24/bootstrap-3-3-6-released/
and use the layout.jade file
gist.github.com/harsha547/20d1062e3318a195a9b4bfeb9d958133
To download resource file please click on below link it may help you
content.eduonix.com/Projects-Using-Nodejs-Updated/resources/LogoutandAccessControl.zip
how can the flash messages auto hide after some seconds?
Please refer to the link mentioned below to get an idea about your query
www.npmjs.com/package/express-flash-notification
Why is the layout.jade file html tagging not like the usual?? instead of () ..anyone?
Refer to the below link for the same
medium.com/@articlesfromsophie/what-is-jade-and-why-did-i-use-it-to-code-my-website-3ef692a5102f
i build login jwt token authentication using angular4 and mean. now i want to build session login for my project. how to build that session and procedure for that. can u please guide me through
Check below link it may help you
pt.stackoverflow.com/questions/230259/login-com-angular-4
stackoverflow.com/questions/39840457/how-to-store-token-in-local-or-session-storage-in-angular-2
i already visited those pages. its not my requirement. anyway thakns for ur suggestion
jwt is better than passport js?
Can someone help, when i hit submit to test if the console receives it , nothing happens. The button doesn't do anything.
Please refer to the link mentioned below to get an idea about it
scotch.io/tutorials/build-and-understand-a-simple-nodejs-website-with-user-authentication
I'm ready to learn a server side language, should I learn node.js or php?
Hello, If you are willing to learn a server-side language, then you should start with PHP. Check out the certification course with up to 90% OFF on - bit.ly/2XVALF1
You can also check NodeJS tutorial - czcams.com/video/kv7tMUtwIvs/video.html
How can I check if a user already exists during registration in the database and throw an error?
Check the link below it may help you
programmerblog.net/nodejs-user-registration-tutorial/
my cmd is saying unrecognized option for --rest . so what do I do?
use mongodb v3.4
Poor Brad, he installating Node and MongoDB for so many videos
Guys, how can I install the mongoDB? First problem: I got a different site (not org). I downloaded something and finally have the folder on my Mac, however I struggling with the Terminal: it says that there is no such a command like " mongod". What can I do? How can I install Mongo on Mac?
Refer to the link mentioned. It might help you.
treehouse.github.io/installation-guides/mac/mongo-mac.html
@@eduonixsupport1889 Thanks for your quick response. I solved it. Now I'm struggling with modules what is required/imported. The main problem is that in the video we write different code (like handlebars vs ejs in the GitHub file). If I just use the codes regarding Github it doesn't help. Is there any other/updated video which is also about the login/register?
Get Yourself Any Course Of Your Choice For Free
{Use Coupon Code: YTBFREE}
Explore Our All Courses - shorturl.at/hpEQ3
can we get this in html instead of jade
To run this project please use the jade this will avoid the conflict
Could i get some sort of link for this like where I can download it and see the code
Refer to the link below to download the resource files.
educontent.s3.amazonaws.com/LearnNodejs-bybuilding-10projects/User-Login-System-Using-Nodejs.zip
@@Eduonix thank you so much guys..
why you install mongodb in dependencies? Does mongoose not include mongodb?
MongoDB is an Open Source, NoSQL database management system. Whereas MongooseJS is an Object Document Mapper (ODM) that makes using MongoDB easier by translating documents in a MongoDB database to objects in the program.
yeah I know it, but you can use mongoose without "mongodb" in your dependencies.
I am getting an error on entering the path " mongod --directoryperdb --dbpath C:\mongodb\data\db --logpath C:\mongodb\log\mongodb.log --logappend --rest --install "
Error parsing command line: unrecognized option ` --rest`
Hi Poonam, please check if these links can help you:
stackoverflow.com/questions/2438055/how-to-run-mongodb-as-windows-service/41073438\stackoverflow.com/questions/46678638/mongodb-unrecognised-option-install
jira.mongodb.org/browse/SERVER-13515
this link dose not exist !? it might be deleted
My command prompt get the error "Error parsing command line: unrecognised option '--rest' " at 12:23.
After mongodb installation set mongodb bin path and copy Windows\System32 path in environment variable.follow steps.1. open Command Prompt run as administrator
2. cd mongodb bin path
3. set below path
mongod --directoryperdb --dbpath C:\mongodb\data\db --logpath c:\mongodb\log\mongodb.log --logappend --rest --install
5. net start MongoDB
I did exactly that, and i still get the error on 2 different PCs. So i do not know what i'm doing wrong.
C:\mongodb\bin>mongod --directoryperdb --dbpath C:\mongodb\data\db --logpath c:\mongodb\log\mongodb.log --logappend --rest --install
Error parsing command line: unrecognised option '--rest'
try 'mongod --help' for more information
its my question too
I get, "TypeError: expressValidator is not a function", how do you resolve this in your code?
Try downgrading your express validator to v5.3.1
Alternatively, after some (ok, I'm not a javascript coder, so, quite a bit) of pain, I found that removing the expressValidator() from app.js and altering the post and error handling to
router.post('/register', upload.single('profileimage'), [
check('name','Name field is required').isLength({min:1}),
check('email','Email field is required').isLength({min:1}),
check('email','Email field is not valid').isEmail(),
check('username','Username field is required').isLength({min:1}),
check('password').custom((value,{req,loc,path})=> {
if( value.length < 1 ){
throw new Error("A password is required")
}else if( value !== req.body.password2 ){
throw new Error ("The passwords do not match")
}else{
return value;
}
})
], (req,res,next) => {
// Check errors
const errors = validationResult(req)
if(!errors.isEmpty()){
res.render('register',{ errors: errors.array() })
console.log(errors.array())
}else{
console.log('No errors')
}
const name = req.body.name
const email = req.body.email
const username = req.body.username
const password = req.body.password
const password2 = req.body.password2
});
with the command
const { check, validationResult } = require('express-validator');
to import that validator tools works for me (so far). I used these resources
express-validator.github.io/docs/custom-error-messages.html
stackoverflow.com/questions/46011563/access-request-body-in-check-function-of-express-validator-v4/46013025#46013025
among others.
@@brianhong6787 Thank you for sharing your valuable insights. It might help others.
In PHP = 10 lines of code... Done! 5 minutes. Node.JS = five years later. still writing dependencies... :D
We didn't get you. Can you please elaborate on the issue?
Not true. Its about the same.
as of now , it says
Jade is deprecated - use pug
transformers deprecated - use jstransformers
..
-found 2 low severity vulnerabilities
Shall i continue with this tutorial?
Use jade for this project it will avoid the conflict
hello sir, i learnt express-handlebars, they are trivial and awesome, earlier i had use Mustache.js , its kind of similar to that. Thanks for reply.
is there any github link to the finished project? Im having issues logging in. It might be because I'm using a macbook.
Can you let us know which type of issue are you facing?
if i finish this tutorial and try to log in, it works. But as soon as i restart the server and try to log in, it doesnt stop loading...PLEASE help
Refer to the following link to get an idea about authentication issues
github.com/jaredhanson/passport/issues/482
use nodemon
npm install -g nodemon
to handle restart
Thank you for sharing
im getting the below error can you help me out
C:\mongodb\bin>mongod --directoryperdb --dbpath c:\mongodb\data\db --logpath c:\mongodb\log\mongodb.log --logappend --rest --install
Error parsing command line: unrecognised option '--rest'
try 'mongod --help' for more information
use mongodb v3.4
Can you send the link where you copied the code in layout.jade please? thanks. I can't seem to find it anywhere.
Use the below code
doctype html
html(lang='en')
head
title Welcome
link(href='/stylesheets/bootstrap.css', rel='stylesheet')
link(href='/stylesheets/style.css', rel='stylesheet')
body
.navbar.navbar-default(role='navigation')
.container
.navbar-header
button.navbar-toggle(type='button', data-toggle='collapse', data-target='.navbar-collapse')
span.sr-only Toggle navigation
span.icon-bar
span.icon-bar
span.icon-bar
a.navbar-brand(href='#') NodeAuth
.navbar-collapse.collapse
ul.nav.navbar-nav
li(class=(title == 'Members' ? 'active' : ''))
a(href='/') Members
li(class=(title == 'Register' ? 'active' : ''))
a(href='/users/register') Register
li(class=(title == 'Login' ? 'active' : ''))
a(href='/users/login') Login
ul.nav.navbar-nav.navbar-right
li
a(href='/users/logout') Logout
.container
block content
script(src='ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js')
script(src='javascripts/bootstrap.js')
Thanks, this is perfect. I wanted to let you know, the tutorial is really good. I'm starting node.js and it is all very clear.
how can i display users name on login?
Refer to the link. You will get an idea about it
stackoverflow.com/questions/37229700/node-js-passport-display-username-after-successful-login
req.logout() gave me 404 error. Is this due to the express version higher than 3.0.0 cause this problem
Have you checked your code?
Eduonix Support I checked it but it worked. Some typing problem. Can you make a video about create a vote and display in chart in node.js đ€đ€that would be useful
We will try. Subscribe us to get updates on latest courses.
How to do authentication using oracle?
Can you please elaborate the question?
Eduonix Support According to user authentication with oracle db,I want to display admin page for admin and user page for normal users in angular.
I'm a bit stuck at 35.05 because the express errorFormatter documentation has been updated.(I think this video is actually from 2016!) Im looking through the new documention to figure it out but if anyone knows what to use instead it would be great if you could post it here. here is the link to the documentation express-validator.github.io/docs/
I just typed the code myself and so far it seems to be working so far.
Hi Tommy, best luck! If you get stuck somewhere, we shall try and help you out!
well it has worked out for me so far, thanks!
cannot install MongoDB. windows installer says "installation ended prematurely"
1) click below link and install mongodb
www.mongodb.com/download-center#community
After MongoDB installation set MongoDB bin path and copy the Windows\System32 path in the environment variable.follow steps.
1. open Command Prompt run as administrator
2. cd MongoDB bin path
3. set path
mongod --directoryperdb --dbpath C:\mongodb\data\db --logpath 4. c:\mongodb\log\mongodb.log --logappend --rest --install
5. net start MongoDB
6. run below command
mongo2) check below link it may help youdiscussions.citrix.com/topic/244798-installation-fails-installation-ended-prematurely-because-of-an-error/www.itprotoday.com/windows-8/why-do-i-receive-error-installation-ended-prematurely-because-error-when-i-try-install
Uncheck the install mongo compass option checkbox that shows just before you install at the bottom left side of the setup.
Could you upload all the source codes?
Refer to the links below for resource files:
educontent.s3.amazonaws.com/Projects-Using-Nodejs-Updated/resources/AppandMiddlewareSetup.zip
educontent.s3.amazonaws.com/Projects-Using-Nodejs-Updated/resources/ViewsandLayout.zip
educontent.s3.amazonaws.com/Projects-Using-Nodejs-Updated/resources/RegisterFormandValidation.zip
educontent.s3.amazonaws.com/Projects-Using-Nodejs-Updated/resources/PasswordHashingwithBCrypt.zip
educontent.s3.amazonaws.com/Projects-Using-Nodejs-Updated/resources/PassportLoginAuthentication.zip
educontent.s3.amazonaws.com/Projects-Using-Nodejs-Updated/resources/LogoutandAccessControl.zip
Sir, the registration works and stores in db, but login isn't working... keep saying invalid username or password
Please refer the link given below it may help you to resolve the issue:
medium.freecodecamp.org/securing-node-js-restful-apis-with-json-web-tokens-9f811a92bb52
The same is happening with me also. Did u get it's solution?
Not yet man
how to I create it using mysql?
Check below link it may help you
medium.com/technoetics/handling-user-login-and-registration-using-nodejs-and-mysql-81b146e37419
www.expertphp.in/article/user-login-and-registration-using-nodejs-and-mysql-with-example
www.js-tutorials.com/javascript-tutorial/node-js-user-authentication-using-mysql-express-js/
Check the below links, they may help you:
medium.com/technoetics/handling-user-login-and-registration-using-nodejs-and-mysql-81b146e37419
www.expertphp.in/article/user-login-and-registration-using-nodejs-and-mysql-with-example
www.js-tutorials.com/javascript-tutorial/node-js-user-authentication-using-mysql-express-js/
I can't logout, I exactly copied the code but when instead of being redirected I get a 404.
Try the code below which is resource file of this program it may help you
content.eduonix.com/Projects-Using-Nodejs-Updated/resources/LogoutandAccessControl.zip
I did my login page and successfully completed it. If i open now,i am getting an erroe in MongoDb starting problem.......Can u please help me out!!!!!!
You can refer this link o Connect Node.js to a MongoDB Database on a VPS www.digitalocean.com/community/tutorials/how-to-connect-node-js-to-a-mongodb-database-on-a-vps
100% Discount for binge learners!
Learn your favourite skills at cutt.ly/WzL60do and get a flat 70% site-wide discount and an extra 30% cart discount on your purchase.
how can I replace mongodb by mysql?
Yes you can replace MongoDB to MySQL refer to this link www.oodlestechnologies.com/blogs/It-is-wise-to-replace-MySQL-with-MongoDB
Yes, you can replace mongoDB to mysqlcheck below link www.oodlestechnologies.com/blogs/It-is-wise-to-replace-MySQL-with-MongoDB
Yes you can replace mongoDB to mysql refer to this link www.oodlestechnologies.com/blogs/It-is-wise-to-replace-MySQL-with-MongoDB
Yes you can replace MongoDB to MySQL refer to this link www.oodlestechnologies.com/blogs/It-is-wise-to-replace-MySQL-with-MongoDB
Download the community version of mongodb
You can download the community version of mongodb. from this link. docs.mongodb.com/manual/administration/install-community/
What code is available for this project?
To download resource file please click on below link it may help you
content.eduonix.com/Projects-Using-Nodejs-Updated/resources/LogoutandAccessControl.zip
The steps were not explained thoroughly at all. The entire process was rushed through. Should have made a more detailed video on login systems using node and mongoDB. Maybe a playlist. Anyways, can anyone suggest where i can find a more detailed explanation of login and authentication using node and mongoDB.
Following links may help you to solve your problem:
codebun.com/login-registration-nodejsexpress-mongodb/
medium.com/@kevinhsu_83500/user-authentication-with-node-js-and-mongodb-c8b1645513f9
my register is not redirecting neither is it saving
To download resource file please click on below link it may help you
content.eduonix.com/Projects-Using-Nodejs-Updated/resources/LogoutandAccessControl.zip
Become a Master of web development with our JS E-degree - bit.ly/3e1Mk3f
Apply coupon "COL50" to get Extra 50% off!
2:00:00
req.isAuthenticated always returning false......................... why???
You can refer to the link mentioned below for getting an idea about your query
github.com/jaredhanson/passport/issues/482
!= messages() gives error..
Exactly what error you are getting?
can u give me index.js code
index.js
var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', ensureAuthenticated, function(req, res, next) {
res.render('index', { title: 'Members' });
});
function ensureAuthenticated(req, res, next){
if(req.isAuthenticated()){
return next();
}
res.redirect('/users/login');
}
module.exports = router;
Source code please?
Is this the same person from Transversy media
Yes, Narendra.
I have been watching your all the tutorials but especially php MVC but as a beginner I m unable to get the full concept of mvc's and JavaScript's can u tell me from where to start for java script from frameworks. And I wold glad if u upload new playlist on chart js and morris js. My concepts are not clear
Thank you for watching the video. You can start learning Javascript from basics here: czcams.com/video/wZ9gPKnW_jU/video.html
Can you share this source code??
Hey Maulik!! Here is the source code: github.com/eduonix/User-Login-System-Using-Nodejs
can't find mongodb after installation. What am I missing?
1) click below link and install mongodb
www.mongodb.com/download-center#community
After MongoDB installation set MongoDB bin path and copy the Windows\System32 path in the environment variable.follow steps.
1. open Command Prompt run as administrator
2. cd MongoDB bin path
3. set path
mongod --directoryperdb --dbpath C:\mongodb\data\db --logpath 4. c:\mongodb\log\mongodb.log --logappend --rest --install
5. net start MongoDB
6. run below command
mongo
12:25 --rest is not working
The --rest option has been removed in MongoDB 3.6. Refer to the following link for the same.
stackoverflow.com/questions/47983629/error-parsing-command-line-unrecognized-option-rest
Maybe somebody need worked code from this tutorial, here the repository (github.com/MaximStrutinskiy/NodeJS/tree/youtube)
branch: youtube
this is not working
Brad, is that you?
Yes. He is one of our instructors.
where is the _layout file with the layout to copy? XD
To download resource file please click on below link it may help you
content.eduonix.com/Projects-Using-Nodejs-Updated/resources/LogoutandAccessControl.zip
Source codes plz plz plz!!!!!!!!
Hey Aman!! Here is the source code: github.com/eduonix/User-Login-System-Using-Nodejs
I would say this is great. But frankly, it's infuriating. On multiple occasions, the application has broken when you attempt to modify or add anything to the solution. It uses deprecated, and therefore out of date files to implement (Even at time of writing, .jade was deprecated). I've gone through this tutorial multiple times, and every time I attempt to dare to modify the registration field, the page breaks, and even when you revert back to a previous working state, it will not return to working. Frankly, a waste of time going through this.
If possible use jade to avoid conflicts. Though there are alternative for jade such as Mustache.js, Handlebars.js etc.
лаĐčĐș
why my navbar looks like this: ibb.co/i1y0wy i have no errors.
To download resource file please click on below link it may help you
content.eduonix.com/Projects-Using-Nodejs-Updated/resources/LogoutandAccessControl.zip
Please upload the source code
Refer to the links below for resource files:
educontent.s3.amazonaws.com/Projects-Using-Nodejs-Updated/resources/AppandMiddlewareSetup.zip
educontent.s3.amazonaws.com/Projects-Using-Nodejs-Updated/resources/ViewsandLayout.zip
educontent.s3.amazonaws.com/Projects-Using-Nodejs-Updated/resources/RegisterFormandValidation.zip
educontent.s3.amazonaws.com/Projects-Using-Nodejs-Updated/resources/PasswordHashingwithBCrypt.zip
educontent.s3.amazonaws.com/Projects-Using-Nodejs-Updated/resources/PassportLoginAuthentication.zip
educontent.s3.amazonaws.com/Projects-Using-Nodejs-Updated/resources/LogoutandAccessControl.zip
Traversy? It is you Traversy?...
200