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

# Authentication methods

> There are three ways to authenticate with PlanetScale: _email address and password_, _single sign-on_, and _OAuth via GitHub_.

## Overview

Let's break down how each of these work.

## Email address and password

This is the only authentication mechanism where PlanetScale maintains user credentials.

Additionally, users can opt to configure [two-factor authentication (2FA)](https://planetscale.com/docs/security/multi-factor-authentication.md). This asks for your password and something you have: an authenticator app, a passkey, or a hardware security key. If your passkey confirms it's you with Face ID, Touch ID, or a PIN, it can also sign you in without a password. Recovery codes are a backup if you lose access to your authenticator app or keys.

## Single sign-on

Users can authenticate with their chosen corporate identity provider *(i.e. Okta)* instead of maintaining passwords with PlanetScale.

Once [SSO](https://planetscale.com/docs/security/sso.md) is enabled for an `organization`, all members are redirected through that identity provider's authentication flow. Moving forward, they must pass through SSO to access their PlanetScale account.

## OAuth via GitHub

Users can authenticate with PlanetScale using their GitHub account.

> [!WARNING]
>
> PlanetScale doesn't maintain the passwords for these accounts. Losing access to your GitHub account prevents accessing
> your PlanetScale account.

> [!NOTE]
>
> Enabling SSO removes OAuth access for all members of your *organization*, meaning they will no longer be able
> to sign in with their GitHub credentials.

### Switch to email and password

You can stop signing in with GitHub and sign in with your email address and a password instead.

**Step 1**

Go to your [PlanetScale account settings](https://app.planetscale.com/settings/account) page.

**Step 2**

In the **Sign in with GitHub** section, click **"Disconnect GitHub"**.

**Step 3**

Click **"Confirm on GitHub"** and approve the sign-in on GitHub.

**Step 4**

Enter and confirm a new password, then click **"Disconnect GitHub"**.

Signing in with GitHub stops working for your account, and you are signed out of PlanetScale in your other browsers. Your account then works like any other email and password account, including [multi-factor authentication](https://planetscale.com/docs/security/multi-factor-authentication.md).

> [!NOTE]
>
> Accounts that belong to an organization using SSO can't disconnect GitHub.

## Revoke all sessions

If you lose a device, or think someone else might be signed in to your account, you can revoke all of your sessions. This:

* Signs you out of PlanetScale in every other browser. The browser you use to revoke your sessions stays signed in.
* Revokes your pscale CLI logins.
* Revokes the OAuth applications you authorized, such as MCP clients.

It also cancels any CLI login or application authorization you approved that hasn't finished yet. Organization [service tokens](https://planetscale.com/docs/api/service-tokens.md) aren't affected, because they belong to the organization.

**Step 1**

Go to your [PlanetScale account settings](https://app.planetscale.com/settings/account) page.

**Step 2**

In the **Revoke all sessions** section, click **"Revoke all sessions"**.

**Step 3**

If you're asked to confirm access to your account, confirm it.

**Step 4**

Select the checkbox to confirm that your other browsers, CLI logins, and applications will need to sign in again, then click **"Revoke all sessions"**.

To keep using the CLI, run `pscale auth login`. Reauthorize any applications you still use. The event is recorded in your [security log](https://planetscale.com/docs/security/security-log.md).

## Need help?

Get help from [the PlanetScale Support team](https://planetscale.com/contact?initial=support), or join our [Discord community](https://pscale.link/community) to see how others are using PlanetScale.


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