Overview
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-label?
White-label 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-label)
Implementation
Setting Up White-label
To set up white-label for your OAuth integrations:1
Register Your Application
Register your application with the third-party service (GitHub, Slack, etc.) to obtain your client ID and client secret.
2
Configure White-label 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.
3
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.
4
(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 -