[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [local‑first/Owner](https://evolu.dev/docs/api-reference/common/local-first/Owner) › ownerSecretToOwnerId

```ts
function ownerSecretToOwnerId(
  secret: (
    | (Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length16">)
    | (Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length24">)
    | (Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length32">)
    | (Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length20">)
    | (Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length28">)
  ) &
    Brand<"OwnerSecret">,
): string & Brand<"Id"> & Brand<"OwnerId">;
```

Defined in: [packages/common/src/local-first/Owner.ts:274](https://github.com/evoluhq/evolu/blob/1ef91d4e21b74fa0c122e48558188dc42676c429/packages/common/src/local-first/Owner.ts#L274)

Converts an [OwnerSecret](https://evolu.dev/docs/api-reference/common/local-first/Owner/variables/OwnerSecret) to the [OwnerId](https://evolu.dev/docs/api-reference/common/local-first/Owner/variables/OwnerId) of the owners it
creates, without deriving their keys or mnemonic, such as to tell whether a
backup's [AppOwner](https://evolu.dev/docs/api-reference/common/local-first/Owner/interfaces/AppOwner) is already on the device.

### Example

```ts
import {
  assertTrue,
  mnemonicToOwnerSecret,
  ownerSecretToOwnerId,
  testAppOwner,
  type OwnerId,
} from "@evolu/common";

// The IDs of the AppOwners on this device.
const appOwnerIds: ReadonlySet<OwnerId> = new Set([testAppOwner.id]);

// A backup's mnemonic, of an AppOwner that's already on this device.
const secret = mnemonicToOwnerSecret(testAppOwner.mnemonic);

assertTrue(appOwnerIds.has(ownerSecretToOwnerId(secret)));
```