Scott begins explaining the process of creating a new user. Users supply their username and a password. A hashed version of the password will be stored in the database. When a users logs on in the future, the submitted password will be hashed and compared to the stored password in the database.
- So the process is like this: a user signs up to access…protected resources on our API.…So that means they give us a user name, and a password.…They sign up.…On success, we create a new user in our database, right?…So it's like, cool, that user name is great,…it's not taken, password matches our validations,…whether that's like a min length or a max length,…or whatever validation was, if any.…Great, we created a new user in our database, you're good.…So typically what you would do there is, on a sophisticated…system you'd probably say, I'm going to make a new session…and sign him in, and sign a cookie, and send that…back to the browser.…
But what we're going to do now is we're going to grab…that new user's ID that we just saved in the database,…and we're going to create a JSON web token,…just like we did up top.…We then send that JSON web token back to the user…on the response of sign-up.…So when they sign up, they should expect to get back…a token string, like here's your token, you signed up…successfully, here you go.…
This course was created by Frontend Masters. It was originally released on 12/30/2015. We're pleased to host this training in our library.
- Executing Node.js
- Using Express
- What is middleware?
- Testing in Node.js
- Using Mongo with Node.js
- Data modeling
- Querying data with Mongoose
- Identifying sensitive routes
- Configuring the deployment
Skill Level Intermediate
Node.js: Build Your First Microservicewith Daniel Khan2h 9m Intermediate
Building APIs Using Hapi in Node.jswith Kirsten Hunter2h 23m Intermediate
Node.js: Extend and Maintain Applicationswith Daniel Khan3h 35m Intermediate
2. REST APIs
5. Organization and Configuration
7. Data Modeling
10. Securing Routes
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.