Authenticating

January 12th, 2020
auth

Limited Time

I didn't have much time to work on my coursework today, but I got as much out of it as I could. I was at work from 7 to 5:30, and then had some stuff to do around the house after I got home. I wasn't able to actually get down to work until around 8, so I jumped right in. For the last week or two, I've been working on Stephen Grider's Modern React with Redux course on Udemy. This course covers a lot of different facets of React, starting with the very basics and working up all the way through some pretty complex stuff. So far, I've completed the big introduction portion of the course on React and the introduction portion on Redux. I'm now in the throes of what seems to be some sort of final project. This project spans about 9 and a half hours of the course and covers all sorts of topics. This project is a clone of the popular app, Twitch, which is a popular streaming app for gamers and others. In the last section we set up all of the routing for the separate pages of the app. When completed, it will have the capabilities of adding, editing, deleting and showing different streams, with each page providing these views. That means this will eventually be a full CRUD app, but we're pretty far off from that eventuality.

crud

In the current section, we started to set up OAuth. If you haven't come across OAuth, yet, it's an amazing tool provided by Google to allow users to get authenticated without having to use a username and password. There are many ways to get authenticated, including the use of the user's Facebook, Github, Google, or many other accounts as an authentication device. I've built an app in a former course where the user had the ability to choose from multiple different options for authentication. They could sign up with a username and password that was held on Firestore, or with Google or Facebook using OAuth. This was pretty cool, and the really nice thing about it is that OAuth is pretty self-sufficient. There really isn't that much could to implement to get it to work. For this app, we've added about 25 or 30 lines of helper functions to implement the capabilities to use Google for authentication, and it really isn't all that complex. If someone else were to look at the code, it's pretty intuitive and wouldn't be that difficult to understand what's happening. Now, though, comes the hard part. We're going to basically scrap everything we just wrote and implement it using Redux, instead. While I don't fear Redux as much as I used to, this is going to be one of the more complex use cases I've come across with Redux. I'm curious to see if my brain can handle it.

react

The other day, I was looking through one of the many newsletters on coding I get in my email and found an article written by Dan Abramov. If you aren't familiar with Dan, he's the co-creator of Redux and one of the React Core team members. For most, he's considered the leading mind in the React community and is often given the task at conferences of announcing the biggest changes to the React codebase. For example, when hooks were introduced, it was Dan who introduced them. When I see something he's written or a video he's created, I tend to take notice. This article was written about his own journey in learning JavaScript and how his mental model was transformed from when he started. He has decided to write what I think will eventually be a book called Just JavaScript, documenting what he believes is the correct way to create that mental model for JavaScript. It's really interesting to hear someone I think to be an absolute expert in JavaScript talk about how much he struggled with the language no more than 5 years ago. In that amount of time, he's mastered the language and gone on to do some of the most transformative things with it in the world of React. He is sending out emails daily to anyone who wants to subscribe that represent a sort of beta version of his book in chapters, and he's asking for feedback along the way. I signed up and received the first email yesterday, and the second today. While the concepts he's introducing in these first couple of posts are pretty rudimentary, he is focusing more on the way we think about the language itself and trying to help readers create a better frame of mind to process the language. It's unlike anything I've read on a programming language yet, and I'm really interested to see where he goes with it.

Until tomorrow!

Created by Sam Thoyre, © 2019