btn.social

Getting Started

  1. You must create an account.
    Your account must also be activated to proceed. You will be redirected until this is complete. You may also visit your Account settings at any time and click the Manage Billing link.

  2. You may create your first App. If not redirected, you may navigate to https://app.btn.social/new directly.

  3. Configure your first social provider.

    1. Click on the + Add Provider button and click on the desired social provider icon from the options list in the dialog.
    2. Copy the Callback URL value, which will be referred to as CALLBACK_URL, for use within the OAuth application.
      NOTE: A CALLBACK_URL always has this format:
      https://login.btn.social/{APPID}/{PROVIDER}/callback
    3. Acquire the Client ID and Client Secret values from the OAuth provider (see guides) and paste them into the Credentials tab of the btn.social dialog.
    4. (Optional) Navigate to the Scopes tab of the dialog and select which provider-specific scopes to enable.
    5. Click Save to apply changes.
  4. Create a login.btn.social link into your page(s):

    <a href="https://login.btn.social/{APPID}/{PROVIDER}">
      Login with {PROVIDER}
    </a>
  5. Include the btn.social web SDK onto your page(s).
    There are a number of ways to achieve this, but below is the simplest:

    <!-- Load the SDK and pass "myCallback" as the ready hook -->
    <script async src="https://btn.social/v1/web.js" data-jsonp="myCallback"></script>
    <script defer>
      // Global function that the SDK will call
      // automatically once it has downloaded
      function myCallback() {
        // A handler when login is successful
        // ~> `btnsocial` global is available via SDK
        btnsocial.onlogin(function (payload) {
          console.log('login complete!', payload);
        });
      }
    </script>