Define a Secret

You can define a new Realm Secret in the Realm UI, with the Admin API, or with the Realm CLI. Realm Secrets are not included in exported application directories.


You can define a new Secret from the Secret configuration screen in the Realm UI. To navigate to the configuration screen, click Values & Secrets in the left navigation menu and then select the Secrets tab. Click Add a Secret.


Enter a unique Secret Name. This name is used to refer to the Secret from authentication providers, service configurations, and Values.

Secret Name Restrictions

Secret names must not exceed 64 characters and may only contain ASCII letters, numbers, underscores, and hyphens. The first character must be a letter or number.


Enter the Secret's definition in the Secret Value input and then enter the same definition in the Confirm Secret Value input. The definitions must match in order to save the Secret.

The secret value input in the UI
Secret Value Length Restrictions

Secret values may not exceed 500 characters in length.


After you have named and defined the new Secret, click Save. Once saved, you can immediately reference the Secret by name in service configurations and secret Values.

  • You can only define a Realm Secret using the Realm UI, the Admin API, or the Realm CLI.
  • Realm Secrets are not exported and cannot be read directly.
Give Feedback