OAuth 2.0 Authentication
Learn how to use OAuth 2.0 to connect to third-party services in ByteChef
OAuth 2.0 is the industry-standard protocol for authorization. It allows ByteChef to obtain limited access to user accounts on an HTTP service, such as Google, GitHub, or Salesforce, without requiring your password.
How it Works
- Authorization Request: When you create a new connection, ByteChef redirects you to the service provider (e.g., Google).
- User Authorization: You log in to the service provider and grant ByteChef permission to access your data.
- Authorization Grant: The service provider redirects you back to ByteChef with an authorization code.
- Access Token: ByteChef exchanges the authorization code for an access token, which is used to make API calls on your behalf.
Setting Up OAuth 2.0 Connections
To set up an OAuth 2.0 connection in ByteChef:
- Go to the Connections tab.
- Click New Connection and select a service that uses OAuth 2.0.
- Enter a Name for the connection.
- Paste the Client ID and Client Secret copied from the service provider's developer portal.
- Click Next to continue setting up the connection.
- Select scopes for the connection and click Connect.
- You will be redirected to the service's login page.
- Review the permissions requested and click Allow or Authorize.
- Once redirected back to ByteChef, your connection is ready to use.
Predefined Apps
For many popular services, ByteChef ships a predefined OAuth app with hosted client credentials. When one is available, the Client ID and Client Secret fields are hidden and you can connect in a single click without registering your own app. To use your own credentials instead, click the I want to use my own app credentials link in the dialog. Switching back is done with I want to use predefined app credentials.
Redirect URI
When you use your own OAuth app, the connection 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 will fail with a redirect URI mismatch.
Security
ByteChef securely stores access tokens and refresh tokens. Credentials are encrypted at rest with AES-GCM, ensuring your data remains private and secure.
Related: Troubleshooting OAuth 2.0
How is this guide?
Last updated on