Home

010


April 25, 2020


This is more like days 10, 11, and 12, but because I didn’t write on those days for what I did, and the discontinuity will bother me, I’m just going to call this day 10. Also, there was naught but a whole bunch of circling around figuring out this whole problem of authentication that means I managed to get nowhere between the three days together. To be fair, one of those days was predominantly spent playing Borderlands. I have, however, made some nominal changes to my application that I hope will prove to be beneficial in the long run; the first of which was removing passport.js.

Okay, so maybe removing a dependency of that sort isn’t exactly “nominal.” It was, however, necessary. After working through much of the Advanced Node and Express module on freeCodeCamp, I opted to give passport a try to authenticate a user through Discord. This proved to be quite fruitless, as I was not able to receive the expected response from the Discord API. As a result, I removed all the code that was inclusive of passport in favor of hardcoding the response objects myself. And while I still have not arrived at a point where I am able to log the requested information, I am able to see the entire process from start to finish, which has the added benefit of helping me to understand routing in Express in much greater detail.

This is, after all, one of the primary purposes of this project: to learn.

Therefore, I shall continue to struggle with this process until I find success in authenticating a user and establishing a session in which the user is logged in. I anticipate at least another week’s worth of work, if not more, but I hope it doesn’t actually take that long.

Comments? Follow me on twitter and drop me a line in response to this tweet:

Day 010: a couple days late, but little sense in posting an update when much of the work was the same. Today, however, I took a different approach in working through this authentication flow.https://t.co/fmF1VG6Zw3#nonsensemod365 #thatCodingLife pic.twitter.com/d985upqZyF

— Joshua Alexander (@nonsensecodes) April 25, 2020