Skip to Content
OpenE2EEDocs

Identity and authentication

Device-owned accounts, application identity assertions, and the checks each setup state proves.

The OpenE2EE Signal Protocol Relay authorizes each request from verified credentials. A user ID, device ID, provider subject, organization, project, or environment sent by a client is never authority by itself.

Reviewed: 2026-11-08.

Sandbox first

Every Sandbox and Production environment starts device-owned. The first registration that Relay admits or reserves fixes the identity mode of that environment. Any other account history fixes it too. See in-use environments.

Device-owned identity is the shortest path to the first Sandbox message. The device proves possession of an account key. Sandbox credentials cannot cross into Production.

In a Sandbox environment configured for device-owned identity, hostedSignalProtocolRelaySandboxIdentity(storage) from the SDK creates the getIdentityAssertion callback. The callback signs a device-owned assertion with an Ed25519 key that it keeps in storage, and the Relay binds the account to that key. Pass the same store as adapters.storage:

import {
  createHostedSignalProtocolClient,
  hostedSignalProtocolRelaySandboxIdentity,
} from '@open-e2ee/signal-protocol-sdk';

const signal = await createHostedSignalProtocolClient({
  adapters: { storage },
  hosted: {
    relayUrl,
    getIdentityAssertion: hostedSignalProtocolRelaySandboxIdentity(storage),
  },
});

The helper works only in a Sandbox environment configured for device-owned identity. It cannot register against Clerk, Firebase, or custom-token identity. Those verifiers require an assertion from the configured application identity. The Sandbox environment does not bypass that check.

It signs only device registration, and it rejects a request for a production environment, recovery, provider migration, or recent or step-up assurance. A device that loses its store loses its Sandbox account, so an in-memory store creates a new Sandbox test account on each run. Another device of the account joins through device linking, not with a copy of the key.

Sandbox also supports custom-token identity for application-member tests. Select that profile before any device registers in the environment. Use its own connection URL, assertion audience and device stores.

Production environments also start device-owned. For application-bound Production accounts, select the custom-token profile or a native provider profile before the first device registers. Device-owned identity does not bind a Relay account to your application login. Protect its persistent account key. Provider sign-in cannot recover that key after its loss.

In a Production environment in device-owned identity mode, hostedSignalProtocolRelayDeviceOwnedIdentity(storage) from the SDK creates the getIdentityAssertion callback. The helper also works in a Sandbox environment configured for device-owned identity. Pass the same store as adapters.storage:

import {
  createHostedSignalProtocolClient,
  hostedSignalProtocolRelayDeviceOwnedIdentity,
} from '@open-e2ee/signal-protocol-sdk';

const signal = await createHostedSignalProtocolClient({
  adapters: { storage },
  hosted: {
    relayUrl,
    getIdentityAssertion: hostedSignalProtocolRelayDeviceOwnedIdentity(storage),
  },
});

The callback signs a normal-assurance registration assertion with an Ed25519 key in storage. The key never leaves the store. Each publishable key has a separate key. For the same store and publishable key, this helper and hostedSignalProtocolRelaySandboxIdentity(storage) sign with the same key, so the Relay returns the same account.

Device-owned recovery does not exist. A device that loses its store loses its account, and its next registration creates a new account. The callback rejects a request for recovery, refresh, provider migration, or recent or step-up assurance. It creates no key for a request that it rejects.

A Production project in application-bound mode refuses the assertion with ASSERTION_INVALID. The hostedSignalProtocolRelayDeviceOwnedIdentity API reference gives the header and claims of the assertion.

The hostedSignalProtocolRelaySandboxIdentity(storage) helper remains Sandbox-only. Do not use it with a Production connection.

Use application-bound identity for your application member accounts. Your application supplies the SDK callback in either environment. It returns a short-lived assertion for the signed-in member. Configure that verifier before member-device registration. Custom-token setup defines that contract. A native provider profile uses the provider token instead.

Configuration and readiness

Open the project, select Identity, and choose the intended environment in the switcher. Find Identity in Sandbox or Identity in Production. The custom-token path accepts public P-256 signing keys and ES256 assertions. The external ES256 option requires the same Relay-specific claims. It does not accept arbitrary OIDC session tokens.

The Signal Protocol Relay accepts Clerk and Firebase sign-in as native identity providers in Sandbox and Production. Select Clerk or Firebase in the same form. See native provider profiles. Do not substitute their ordinary tokens for the custom-token contract.

The settings form can select a different profile only while the environment has no account history. A reserved registration counts as use. Deleting a device does not make that environment unused. See in-use environments.

Each status proves a separate fact:

StatusEvidence
Production enabledThe environment has an activated Relay plan.
Identity configuration savedRelay stores the selected verifier policy.
Test assertion validA sample signature and registration claims match the draft verifier. The check stores no assertion.
Device registeredRelay accepted an identity assertion and device proof.
First exchange acknowledgedA recipient device acknowledged a stored message.

A card, a saved profile, or a sample assertion does not prove application integration. A registration does not prove that your backend checks every member correctly. Verify the member mapping and access-control behavior in your application.

Native provider profiles

A native provider profile lets Relay verify the token of the identity provider itself. Your getIdentityAssertion callback returns that token for the signed-in user. No backend signs a Relay-specific assertion.

  • Clerk. Enter the issuer, which is the exact public HTTPS origin of your Clerk instance, and its authorized parties. The callback returns a new Clerk session token on each call. A token from a JWT template without the session claims fails verification.
  • Firebase. Enter the exact Firebase project ID. The callback returns a new Firebase ID token on each call. Relay accepts project-level tokens only and refuses a tenant token.

The provider manages its signing keys. The issuer and the provider user ID together select one Relay account. Provider sign-out does not revoke a registered device. Recovery needs a recent provider sign-in. Ask the user to sign in again before you start recovery. Otherwise, Relay refuses recovery with AUTHORITY_DENIED.

In-use environments

An environment is in use after Relay admits or reserves its first registration. Its account history then fixes its identity source. Relay offers no customer-invoked identity change for an in-use environment. Relay refuses a different profile for that environment, and the settings form shows the saved profile read-only.

Account history belongs to one environment. Deleting devices does not remove that history. Existing devices and messages remain in place.

These paths remain:

  • Rotate signing keys. An in-use custom-token environment keeps its issuer, audience, and subject mapping. Use the Signing keys card to replace its public verification keys. See key rotation and revocation limits.
  • Start a new project. A new project with a new project slug starts with environments that have no account history. Select its identity profile before the first device registers.

What identity does not do

Authentication does not move private keys to Relay. Device identity keys, sessions, ratchets, safety-number state, and recovery secrets stay under the SDK's device-side storage contract. Relay stores public key material and the routing metadata required to deliver ciphertext.

Keep the original change record

The Console keeps each unresolved identity change in the browser before dispatch. Its public record identifies one Organization, Relay project and environment. The record grants no authority. Every later read, retry or cancellation requires current access.

Export and import controls apply only to initial selection. Use Export public retry record to retain that original public command outside the browser. Import it only into its exact Organization, project and environment. Never add an assertion, session, private key or provider credential. A record from another scope cannot authorize a change.

A legacy initial-selection record without its original addressed context remains read-only and unresolved. Current configuration cannot supply its missing original context. The Console cannot replay, cancel or replace that legacy initial-selection original.

A missing or unavailable result does not prove that an earlier request cannot apply. Keep the same identifier and exact public fields. A later response resolves only its matching original record. It cannot remove another change or a newly retained cancellation.

Signing-key removal affects later assertion verification. It does not revoke existing device credentials. Account suspension is a separate deliberate operation. Device-owned identity remains available in Production, but application sign-in cannot recover a lost device-owned account key.

On this page