Home

016


May 2, 2020


I want to understand what passport is doing under the hood. Like really really get it. So I pulled up the github repository (for the second time?) and started working my way through the code. While doing so, I came across several instances where an object method was prefixed by an underscore. This article helped clarify for me what that meant.

While coursing through the code, I realized I could essentially Frankenstein my own passport setup using only the functions I’d need to authenticate, serialize, and deserialize a user. This, however, holds no attraction to me. If I’m going to do that, I may as well just write out the code to do all these things myself. There's no point in pilfering code if the whole idea behind a project is to learn how to do shit.

And speaking of learning how to do shit, due to the simple fact that I don’t fucking know what I’m fucking doing, I’ve decided to step way way WAY back and build some really simple shit to learn how the fuck express works. Late in the evening, I decided to ditch the whole authentication objective, and set it aside for the time being. One goal of mine is to spend time creating a maze of links to thoroughly understand how routing works. Make a game of it, perhaps. The concept of routing in express appears to be simple, yet I think this is where I am failing in properly implementing an OAuth2 authentication system. So maybe this routing game will happen sooner than later, in turning my attention elsewhere.

I also took a moment today to write about ditching dependencies on medium.

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

Day 016: I know the http/s modules in Node, and so can appreciate how powerful @UseExpressJS can be. Problem is, I don’t know Express. So once again, I’ll be going backwards and looking up resources to learn Express.https://t.co/Qf6WIaII8w#nonsensemod365 #thatCodingLife pic.twitter.com/ecgbjqTBbt

— Joshua Alexander (@nonsensecodes) May 3, 2020