Posts

Showing posts with the label encryption

Code Snippets: Password Encryption

Image
Another model I need to use for this web application is for my user's. When someone visits my app I want to ask for username, name, and email. At some point, they should be able to edit their profile to add a picture or an avatar and I definitely want to encrypt their passwords for them. In order to make sure each user has these elements attached to their profile I created a schema, installed a package to handle my encryption, and a package to handle authenticating that password. I chose bcrypt and Password because that is what I'm familiar with and what we went over in class. However, there are other ways to encrypt passwords and other packages that do it similarly. The userSchema.methods and .statics was all 'boilerplate' code that I was able find in our reading material but if I ever need it again in the future I can either look back on this project or find bcrypt documentation. My next steps will be routing my login and register pages that I made templates fo...

Creating a Back End Application

Image
To wrap up our back end instruction The Iron Yard requires a final project that rounds out the skills we've learned over the last three weeks. In a nutshell, we use Node.js and a few of its packages to write an application. Our objective is to create a web app that requires a login and password, allows for registration, enforces password encryption, and brings the user to a home page. For this project, that home page is a code snippet organizer. This project has no mockup or wireframe because design is not the main objective. However, there are a set of abilities our app must have. A user must be able to view all of their snippets, be able to edit or add or delete their snippets, and there must be a search bar that filters through those snippet's tags and languages. That means there are two schemas being used in conjunction. There is a collection of users and a collection of snippets all being stored in the same database. They have to be two separate schemas because each mode...