Bi-Weekly Learning Update (37!)

Recently I got a new job- it’s totally different from what I was doing before (I’m a desk-pusher now!) and I love it, but it’s definitely harder to keep up with coding whilst trying to learn a totally new job …at Christmas time!! I welcome any tips anyone might have to offer! Part of it is literally just getting used to it- my eyes are feeling a little strained by the time Friday night rolls around, but that’s getting better each week. Excuses aside…

Previously I learned about authentication using Passport. In my most recent lessons of the Web Developer Bootcamp, I dove into authorization. The difference is this: authentication is making sure a user is who they say they are, and authorization is making sure they’re allowed to do something.

Authorization is something that makes a page much more polished and finished, but isn’t something I immediately thought of when working on a page.

The way that my app is structured, authentication occurs on every page. The users’ data can then be used to customize what’s shown on the page. This means you can display the buttons to edit or delete a post to the user that created it. Think of pretty much any social media site- you need to be logged in to view certain pages, and you can only modify or delete your own posts, not anyone else’s. We used Passport for the authentication, and because we made the user data available we just used javaScript if statements to check authorization.

The final project of my course is really coming together now- I hope to have the course finished by the new year so I can get back to freeCodeCamp and learning React!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s