OAuth & White Labeling
Klavis AI provides a seamless OAuth integration system that allows you to connect with popular third-party applications while maintaining your brand identity through white labeling.
What is OAuth?
OAuth (Open Authorization) is an open standard protocol that allows third-party applications to access resources on behalf of users without exposing their credentials. Klavis AI implements OAuth 2.0 to securely connect with services like GitHub, Slack, Gmail, Notion, and more.
What is White Labeling?
White labeling allows you to customize the authentication experience with your own branding. When enabled, users will see your application name, logo, and other brand elements during the OAuth flow instead of Klavis AI’s.
OAuth Flow ( w/ white labeling)
Implementation
Setting Up White Labeling
To set up white labeling for your OAuth integrations:
Register Your Application
Register your application with the third-party service (GitHub, Slack, etc.) to obtain your client ID and client secret.
Configure White Labeling in Klavis AI
Go to the Klavis AI white label configuration page:
https://www.klavis.ai/home/white-label
Make sure to add the callback url to your app’s OAuth allow list.
Implement OAuth Authorization
Redirect users to the Klavis AI OAuth authorization endpoint with your client ID:
You can also specify scope and redirect_url in the authUrl, check the api reference for more details.
(Optional) Add Your Own Callback URL
For simplicity, you can use the default callback URL: https://api.klavis.ai/oauth/{server_name}/callback, as shown in the previous step. This is the endpoint where we handle user credentials for authentication.
However, some OAuth consent screens (such as GitHub’s) display the callback URL to the user. If this URL doesn’t match your application’s domain, it can appear untrustworthy.
To address this, you can use a callback URL under your own domain and set up a redirect—either via DNS or within your application—that forwards requests to: https://api.klavis.ai/oauth/{server_name}/callback. Below is an example using FastAPI to simply redirect from your Github oauth application to Klavis oauth service in python -
For technical assistance with OAuth implementation or white labeling, please join our Discord community.