ByteChef LogoByteChef

OAuth 2.0 Authentication

Learn how to use OAuth 2.0 to connect to third-party services in ByteChef

OAuth 2.0 is the standard authorization protocol that lets ByteChef obtain limited access to your account on a service such as Google, GitHub, or Salesforce without receiving your password.

How it works

  1. Authorization request: When you create a connection, ByteChef opens the service provider's sign-in page (for example, Google).
  2. User authorization: You sign in to the service provider and grant ByteChef access to your data.
  3. Authorization grant: The service provider redirects you back to ByteChef with an authorization code.
  4. Access token: ByteChef exchanges the code for an access token (and usually a refresh token) and uses it to call the API on your behalf.

Set up an OAuth 2.0 connection

  1. Click Connections in the main sidebar.
  2. Click New Connection and select a service that uses OAuth 2.0.
  3. Enter a Name for the connection.
  4. Paste the Client ID and Client Secret from the service provider's developer portal. Skip this step when the service uses a predefined app.
  5. Click Next.
  6. Select the scopes for the connection and click Connect.
  7. Sign in on the service's page, review the requested permissions, and click Allow (or the service's equivalent).

After the service redirects you back to ByteChef, the connection is created.

Predefined apps

An administrator can configure a predefined OAuth app for a component, with client credentials stored on the server (bytechef.oauth2.predefined-apps). For such a component, the dialog hides the Client ID and Client Secret fields, and you connect without registering your own app. To use your own credentials instead, click I want to use my own app credentials. To switch back, click I want to use predefined app credentials.

Redirect URI

When you use your own OAuth app, the dialog shows a read-only Redirect URI field with a copy button. Register this exact value as the authorized redirect (callback) URI in the service provider's developer portal. Otherwise the authorization fails with a redirect URI mismatch. The value is <public URL>/callback by default (bytechef.oauth2.redirect-uri).

Security

ByteChef stores the access token and refresh token encrypted at rest with AES-GCM.


Related: Troubleshooting OAuth 2.0

How is this guide?

Last updated on

On this page