> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tembo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Set up Google and GitHub sign-in, and control who can register on Tembo on Kubernetes.

Email and password sign-in is on by default. Set up Google or GitHub sign-in before you invite teammates. These settings apply to your whole install, on any cloud.

## Google sign-in

You need permission to create a Google OAuth client, and access to the `tembo` namespace.

1. In the Google Cloud console, open **Google Auth Platform** and set up your app. Choose **Internal** under **Audience** to allow only your Google Workspace's users.

2. Under **Clients**, create a client of type **Web application**, with the authorized redirect URI `https://<your-host>/api/auth/callback/google`.

3. Save the client secret when Google first shows it, then store it with the client ID in a Secret:

   ```bash theme={null}
   kubectl -n tembo create secret generic tembo-google \
     --from-literal=clientId='<client ID>' \
     --from-literal=clientSecret='<client secret>'
   ```

4. Add it to your `values.yaml` and [apply the change](https://docs.tembo.io/features/self-hosted/kubernetes/configuration.md#apply-changes):

   ```yaml theme={null}
   google:
     existingSecret: tembo-google
   ```

## GitHub sign-in and connected accounts

The [GitHub App](https://docs.tembo.io/features/self-hosted/kubernetes/integrations/github.md) connects repositories. GitHub sign-in and **Settings > Connected accounts > Connect GitHub** need separate settings, but can reuse the app's client ID and secret:

1. In the app's settings, add `https://<your-host>/api/auth/callback/github` as another callback URL. Keep `/api/oauth/github/callback` too.

2. Set the app's **Account permissions > Email addresses** to **Read-only**. Users approve this when they authorize the app.

3. Create a Secret whose keys are config paths:

   ```bash theme={null}
   read -r GITHUB_CLIENT_ID
   read -rs GITHUB_CLIENT_SECRET
   kubectl -n tembo create secret generic tembo-github-login \
     --from-literal=betterAuth.oauth.github.clientId="$GITHUB_CLIENT_ID" \
     --from-literal=betterAuth.oauth.github.clientSecret="$GITHUB_CLIENT_SECRET"
   unset GITHUB_CLIENT_ID GITHUB_CLIENT_SECRET
   ```

4. Add it to `configSecrets` in your values, keeping any existing entries, and [apply the change](https://docs.tembo.io/features/self-hosted/kubernetes/configuration.md#apply-changes):

   ```yaml theme={null}
   configSecrets:
     - tembo-github-login
   ```

Enabling GitHub for connected accounts also enables GitHub sign-in and registration. Installing the GitHub App on an organization does **not** restrict who can sign up: anyone who registers can create their own workspace and use your install's compute, though they can't see your workspace.

## Sign-in and registration

Set these keys under `config` in your Helm values:

| Key | Default | Effect |
| - | - | - |
| `betterAuth.enabledOauthProviders` | Empty | A comma-separated list of enabled OAuth providers. Empty enables all configured providers. Controls both sign-in and account linking. |
| `betterAuth.emailPasswordAuthEnabled` | `true` | Set to `false` to turn off email and password registration and sign-in. Check that another method works first. |

For example, to allow only Google sign-in, once it works:

```yaml theme={null}
config:
  betterAuth.enabledOauthProviders: "google"
  betterAuth.emailPasswordAuthEnabled: false
```

This turns off email and password and other OAuth providers, including GitHub account linking. For a Google Workspace-only install, also choose an **Internal** audience for the Google OAuth client.

These settings aren't an email-domain allowlist or invite-only mode. Restrict access at your network or identity provider before you make the install available to untrusted users.

If existing email and password users get `account_not_linked` when switching to OAuth, keep their password sign-in on and contact support. Self-hosted email and password accounts aren't email-verified automatically, which can prevent automatic linking.

***

## Need Help?

If you run into any issues, contact [support@tembo.io](mailto:support@tembo.io).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.