OAuth for the Confused

While working on some code recently I ended up learning far more about OAuth than I ever wanted to know and so I thought I’d share my pain with the Internet. This guide will cover OAuth 1.0a as that’s what I’ve been working with. OAuth is an open standard for access delegation, commonly used as a way for Internet users to grant websites or applications access to their information on other websites but without giving them the passwords.

JavaScript Prototypes for the Confused

Objects can have a prototype and a prototype is just another object. We can get an object’s prototype using the Object.getPrototypeOf method. Object.getPrototypeOf({}); // → {} Yes, JavaScript really loves objects. It’s objects all the way down. Actually that’s not completely true: Object.getPrototypeOf(Object.getPrototypeOf({})); // → null The first call to Object.getPrototypeOf gave us the prototypical object—the one that acts as the prototype for practically all objects—and calling Object.

JavaScript Properties for the Confused

Like a lot of things related to JavaScript, the syntax and semantics of properties can be a little tricky to wrap your head around. Hopefully this article will serve to simplify and clarify things. Our first step is to do away with the idea of arrays. But wait, arrays are important, surely? Yes, but they’re just conceptual baggage when it comes to understanding properties because arrays are also objects. And don’t call me Shirley.