Treeline.io was launched in the winter 2015 Y Combinator (@ycombinator) class. By implementing the machine specification – a new open standard for node modules – Treeline (@TreelineHQ) empowers designers and front-end developers by providing a way to create modular backend applications without writing code.
One of the launch features of Treeline.io is adding Twitter sign-in to your web app without the hassle of OAuth. Here’s how it works.
OAuth will celebrate its ninth birthday this year, but it’s a technology that even seasoned developers still struggle with. It seems simple enough: direct a user to “sign in with Twitter,” exchange some information with the Twitter API, and voilá: single sign-in achieved. But what information do you send, and how exactly do you send it? What’s the difference between oauth_token and oauth_secret and oauth_verifier, and why do you need to care? Where’s the system that will just figure this stuff out for you?
Treeline lets developers create rich backend apps by connecting drag-and-drop components. Here we’ll show you how you can use Treeline to implement OAuth sign in with Twitter without writing a single line of code.
An app in Treeline is made up of models (the data that your app stores, like “users” and “companies”), routes (URLs like “/login” and “/dashboard”) and machines that you snap together to add functionality to those routes and models. Machines are open-source, swappable components that each do a very specific task, like sending an email, checking the weather, or utilizing a single API endpoint—like the OAuth endpoints for Twitter.
The first step to getting your single sign-in is to create a registered Twitter app at apps.twitter.com. This lets Twitter know that you have a new app you’d like to integrate with their API; in exchange for some information about your app, Twitter provides you with a new API key and other information you’ll need to let users login via OAuth.
View the video below to see the full Twitter OAuth sign in with Treeline implementation:
Treeline lets you go from zero to “signing-in-with-Twitter happy dance” in less than 15 minutes, without writing any code.
It’s worth mentioning again that the machines that are available in Treeline are open source, meaning that any developer can contribute new machines and further enrich the system. If you’d like to get involved, head over to node-machine.org to learn more.
A big thanks to Mike McNeil and the Treeline team for contributing to the Twitter developer blog and making Twitter integrations that much easier for developers. To learn more about their journey in Y Combinator, check out Mike’s blog. Be sure to also check out Mike’s interview with TechCrunch.