While you can implement a complete login and signup system using OAuth 2.0 directly, the open source JavaScript SDK is a simple way to implement login and signup without worrying about the details of the protocol. When a user logs into your site, the SDK saves the credentials for the active Facebook user in a cookie on your site's domain so that you can use the user's identity easily in both your server-side and JavaScript code. It provides a single, simple callback so your application can automatically handle the complex set of authentication states that exist in a single-sign on system.
