Pizzly - The OAuth Integration Proxy

Pizzly - The OAuth Integration Proxy

Pizzly makes it fast and reliable to build API integrations. It handles dozens of pre-configured APIs (including Salesforce, Slack, Google Sheets and many more) and lets you quickly add more APIs with a generic JSON configuration schema.

Pizzly 🐻 - The OAuth Integration Proxy

Pizzly makes it fast and reliable to build API integrations. It handles dozens of pre-configured APIs (including Salesforce, Slack, Google Sheets and many more) and lets you quickly add more APIs with a generic JSON configuration schema.

Using Pizzly your engineering team can focus on consuming APIs, in a standardized way that will grow as you grow.

How it works?

At the heart of Pizzly is a Node.js application that uses PostgreSQL as a database. Once deployed on your servers, each instance of Pizzly provides multiple tools to help developers with their API integrations, including:

  • a dashboard - to enable and configure APIs;
  • an auth service - to handle the OAuth-dance;
  • a proxy - to perform authenticated requests to an API;
  • a JS library - to connect a user and perform requests from your frontend;
  • and its own API - to programmatically do what you can do with the dashboard.

Integrate with many APIs, right from Pizzly's dashboard

Demo

A live demo of Pizzly is available right here. It's hosted on a free Heroku instance, so expect some latency. Beware also that it is a public version of Pizzly - do not save sensitive credentials on it.

Other live demo of Pizzly includes:

Getting started

Pizzly can be installed anywhere (AWS, Heroku, Platform.sh, etc.). Here's a quick guide:

  1. First, deploy your own instance of Pizzly by clicking a deploy button below:

    Heroku Platform.sh
    Deploy to Heroku Deploy with Platform.sh
  2. Once deployed, open your app. You will land on Pizzly's dashboard.

  3. Click on "Open Dashboard" and select the API you want to integrate with.

  4. Now, configure the API by entering your credentials and scopes. That's all it takes to configure a new API.

  5. To connect a user to this API, in your frontend, install pizzly-js:

    npm install pizzly-js
  6. Then open your frontend app and copy-paste the following code:

    import Pizzly from 'pizzly-js'
    
    const pizzly = new Pizzly({ host: 'pizzly.example.org' }) // Initialize Pizzly
    const myAPI = pizzly.integration('xxx-api-name') // Replace with the API slugname
    
    myAPI
      .connect()
      .then(({ authId }) => console.log('Sucessfully connected!', authId))
      .catch(console.error)

    This snippet code will open a popup in your browser to start an authorization flow with the provided API. On success you will obtain an authId which will be be used in the next step.

  7. In your frontend again, use the previously obtained authId to perform a request to the API using the code below:

    myAPI
      .auth('xxx-auth-id') // Replace with the authId previously obtained
      .get('/xxx-endpoint') // Replace with a valid endpoint of the API
      .then(response => console.log(response))
      .catch(console.error)

    This example will perform a GET request to /endpoint of the API and will use the provided authId to authenticate the request.

Documentation

Guides, tutorials and references are all available on the Wiki.

Examples

We have several examples on the wiki with different APIs. Here is the first one to get you started:

const pizzly = new Pizzly({ host: 'pizzly.example.org' }) // Initialize Pizzly
const github = pizzly.integration('github')

github
  .connect() // Connect to GitHub
  .then(({ authId }) => console.log('Sucessfully connected! with the authId:', authId))
  .catch(error => console.error('It failed!', error))

This example will trigger an OAuth dance to the GitHub API.

💡 You'll notice that when a user is successfully connected, we received an authId; it's a power concept introduced by Pizzly. The authId acts as a reference to the OAuth payload (i.e. the access_token and refresh_token). While the access_token and refresh_token expire and/or change over time, the authId is always the same. Think of it as something like a user identity.

Supported APIs

Some pre-configured APIs with Pizzly

More than 50 APIs are preconfigured to work out-of-the-box. Including:

  • Communication: Gmail, Microsoft Teams, Slack, Zoom;
  • CRM: Front, Hubspot, Salesforce, etc.
  • Developer tools: BitBucket, GitHub, GitLab, etc.
  • Finance: Xero, Sellsy, Zoho Books, etc.
  • Productivity: Asana, Google Drive, Google Sheets, Jira, Trello, etc.
  • Social: Facebook, LinkedIn, Reddit, etc.
  • and more...

Each API consists of a JSON configuration file, stored within the /integrations directory. Here's an example with the GitHub configuration file (/integrations/github.json):

{
  "name": "GitHub",
  "auth": {
    "authorizationURL": "https://github.com/login/oauth/authorize",
    "tokenURL": "https://github.com/login/oauth/access_token",
    "authType": "OAUTH2",
    "tokenParams": {},
    "authorizationParams": {},
    "auth": { "accessType": "offline" }
  },
  "request": {
    "baseURL": "https://api.github.com/",
    "headers": {
      "Accept": "application/vnd.github.v3+json",
      "Authorization": "token ${auth.accessToken}",
      "User-Agent": "Pizzly"
    }
  }
}

And adding new APIs is straightforward. Just create a new configuration file within the /integrations folder of your Pizzly's instance. If you feel like sharing, you can even create a PR so that other developers will be able to use it as well!

Why Pizzly?

Pizzly originally started at Bearer.sh as a way to simplify the developer's journey and ease the building of API integrations. OAuth is a great framework, but the difficulty and wide range of implementation makes it painful to use and tends to slow down the ability to integrate with new APIs.

But seriously, why Pizzly? We're fan of bears and fell in love with this sweet hybrid one 🐻

Contributing

While Pizzly is actively backed by Bearer's engineering team, the main purpose of this repository is to continue to improve Pizzly, making it larged and easier to use. We are grateful to each contributors and encourage you to participate by reporting bugs, ask for improvements and propose changes to the code.

Covenant Code of Conduct

Pizzly has adopted the Contributor Covenant Code of Conduct (version 2.0), available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. We expect project participants to adhere to.

Contributing Guide

All work on Pizzly happens directly on GitHub. Both Bearer.sh team members and external contributors send pull requests which go through the same review process. Submit all changes directly to the master branch. We don’t use separate branches for development or for upcoming releases.

To report a bug or a feedback, use GitHub Issues. We keep a close eye on this and try to labelize each new request. If you're fixing a bug or working on a new feature, submit a pull request with detail on which changes you've made.

While there are no templates yet when opening a PR or an issue, we still recommend to provide as much detail as possible. Consider that someone external to the project should understand your request at first glance.

Download Details:

Author: Bearer

Source Code: https://github.com/Bearer/Pizzly

javascript node nodejs

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Node canvas is a Cairo backed Canvas implementation for NodeJS.

node-canvas is a Cairo-backed Canvas implementation for Node.js.

How to Hire Node.js Developers And How Much Does It Cost?

A Guide to Hire Node.js Developers who can help you create fast and efficient web applications. Also, know how much does it cost to hire Node.js Developers.

Hire NodeJs Developer

Looking to build dynamic, extensively featured, and full-fledged web applications? **[Hire NodeJs Developer](https://hourlydeveloper.io/hire-dedicated-node-js-developer/ "Hire NodeJs Developer")** to create a real-time, faster, and scalable...

Decoding Nodejs

The main goal of this blog is to explain the “Architecture of Nodejs” and to know how the Nodejs works behind the scenes. Generally, most of the server-side languages, like PHP, ASP.NET, Ruby, and including Nodejs follows multi-threaded architecture. That means for each client-side request initiates a new thread or even a new process.

Node.js for Beginners - Learn Node.js from Scratch (Step by Step)

Node.js for Beginners - Learn Node.js from Scratch (Step by Step) - Learn the basics of Node.js. This Node.js tutorial will guide you step by step so that you will learn basics and theory of every part. Learn to use Node.js like a professional. You’ll learn: Basic Of Node, Modules, NPM In Node, Event, Email, Uploading File, Advance Of Node.