# Secrets

> This page is about FlutterFlow (the app builder you use by describing your app), not FlutterFlow Studio.

URL: https://docs.flutterflow.io/ffx/secrets

Add, rotate, edit, and delete your app's private keys in Backend › Secrets, where their values stay hidden.

When you're done, your app's private keys are saved in **Backend › Secrets**, where their values stay hidden.

## Add a secret {#add-a-secret}

**Add secret** saves a secret under **Server secrets**, in the selected environment.

1. Open **Backend › Secrets**.
2. In **Server secrets**, select the **Environment** to save the secret in.
3. Click **Add secret**.
4. In **Secret name**, enter a name. A name can be up to 64 characters long, can contain only uppercase letters, numbers, and underscores, and must start with a letter.
5. In **Secret kind**, select **Text** or **File**, and then click **Continue**.
6. Enter the key:
   - For **Text**, enter or paste the key in **Value**.
   - For **File**, click **Choose file** and select the file.
7. Click **Save** followed by the secret's name.

If the environment already has a secret with that name, FlutterFlow says it already exists and asks you to rotate it from its row instead. See [Rotate a secret](#rotate-a-secret).

<Mock name="add-secret" alt="The Add secret drawer after Continue for the dev environment, with an example Secret name and Secret kind Text locked, a Change name button, a line saying saving creates the secret in dev as version 1, Value filled in and hidden as dots, and the Save button followed by the secret's name." />

The secret then appears under **Server secrets** with its name, version, state, size or file name, and the day it was last updated.

<Mock name="secrets-list" alt="Backend › Secrets with Add secret at the top, Server secrets set to the dev environment with two secrets that each show their version, state, size, and updated day beside Versions and Rotate, a Refresh server secrets button, and a Builds group below with two secrets and their More buttons." />

## Rotate a secret {#rotate-a-secret}

To change a server secret's value, save a new version of it:

1. Open **Backend › Secrets**.
2. In **Server secrets**, click **Rotate** on the secret's row.
3. Enter the new key in **Value**, or choose the new file.
4. Click **Save** followed by the secret's name.

Earlier versions stay until you disable or revoke them. To see a secret's versions, click **Versions** on its row.

## Values stay hidden {#values-stay-hidden}

After you save a secret, FlutterFlow never shows its value again: not in **Secrets**, and not when you rotate or edit it.

## Edit a secret {#edit-a-secret}

You can edit and delete the secrets listed under **Builds**. Each one is titled by its **Used for** words, or by its name if it has none.

To change a secret's value, name, or **Used for** words, follow these steps:

1. Open **Backend › Secrets**.
2. Under **Builds**, click the secret.
3. Optional: Change **Used for** or **Name**. Each secret needs its own name.
4. In **Value**, enter the value again. Because saved values stay hidden, you enter the value every time you save, even if you're changing only the name or **Used for**.
5. Click **Save secret**.

If you changed the name, FlutterFlow saves the secret under the new name and removes the old name.

You can't edit a secret that holds a file. You can still delete it.

## Delete a secret {#delete-a-secret}

When you delete a secret, anything that uses it stops working until it's added again.

1. Open **Backend › Secrets**.
2. Under **Builds**, click the secret's **More**, and then select **Delete secret**.
3. In **Delete secret?**, click **Delete secret**.

To keep the secret, click **Undo** in the **Secret deleted** message before it closes and before you leave **Secrets**. After that, you can't undo the deletion.

## Store keys {#app-store-keys}

If your app holds store keys, **Secrets** shows an **App stores** group with an **App Store and Google Play keys** row instead of the keys themselves. To open **Releases**, click the row.

You don't add, edit, or delete store keys in **Secrets**. You connect and remove App Store Connect and Google Play keys on each store's page in **Releases**. See [Connect App Store Connect](https://docs.flutterflow.io/ffx/connect-app-store) and [Connect Google Play](https://docs.flutterflow.io/ffx/connect-google-play).

## Troubleshooting {#if-something-goes-wrong}

If a secret that you deleted comes back with "Couldn’t delete", see [Troubleshoot data and sign-in](https://docs.flutterflow.io/ffx/troubleshoot-data#record-delete-failed).
