gitmyhub

hello.js

JavaScript ★ 4.6k updated 5mo ago

A Javascript RESTFUL API library for connecting with OAuth2 services, such as Google+ API, Facebook Graph and Windows Live Connect

A JavaScript library that adds social sign-in buttons for Google, Facebook, and Windows Live to any website, handling the OAuth handshake and letting you fetch user profile data after login.

JavaScriptnpmOAuthsetup: moderatecomplexity 2/5

hello.js is a JavaScript library that makes it easier to add sign-in with social accounts to a website. If you want your users to be able to log in using their Google, Facebook, or Windows Live accounts rather than creating a separate username and password, hello.js handles the technical process of doing that from inside the browser.

The underlying mechanism it uses is called OAuth, a standard way for websites to ask for permission to act on a user's behalf on another platform. OAuth normally requires a fair amount of setup, and the details differ from one provider to the next. hello.js wraps all of that into a single consistent interface so you can write one block of code that works across multiple networks instead of writing separate handling for each one.

Beyond signing in, hello.js can also retrieve data from those platforms after a user is authenticated. For example, once someone has signed in with Facebook, you can use the library to fetch their profile picture, contact list, photo albums, or status updates. The same calls work across Google and Windows Live where those services support it, and the library documents which features are available on each provider.

To get started, you register your application with whichever social platforms you want to support, include the hello.js script on your page, initialize it with the app credentials you received during registration, and then add a button that triggers the sign-in flow. The library handles the redirect and callback steps automatically. Installation is available via npm or as a direct download.

The project is modular, meaning support for additional platforms can be added through separate module files beyond the three main providers. A newer version under active development is available on a separate branch for those who want to try a more modern rewrite of the library.

Where it fits