Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Rename identity code to account fingerprint in all references
Leendert de Borste2f00e87b14a
diff --git a/apps/browser-extension/src/entrypoints/background.ts b/apps/browser-extension/src/entrypoints/background.tsindex 7641e60ac..06f44cad8 100644--- a/apps/browser-extension/src/entrypoints/background.ts+++ b/apps/browser-extension/src/entrypoints/background.ts@@ -13,7 +13,7 @@ import { handleGetWebAuthnSettings, handleWebAuthnCreate, handleWebAuthnGet, hanimport { handleOpenPopup, handlePopupWithItem, handleOpenPopupCreateCredential, handleToggleContextMenu } from '@/entrypoints/background/PopupMessageHandler';import { handleStoreSavePromptState, handleGetSavePromptState, handleClearSavePromptState, handleGetLastAutofilled, handleClearLastAutofilled } from '@/entrypoints/background/SavePromptStateHandler';import { handleGetTwoFactorPrompt, handleClearTwoFactorState } from '@/entrypoints/background/TwoFactorStateHandler';-import { handleCheckAuthStatus, handleClearPersistedFormValues, handleClearSession, handleClearVaultData, handleLockVault, handleGetFilteredItems, handleGetSearchItems, handleGetEncryptionKey, handleGetUnlockKeyDerivationParams, handleGetPersistedFormValues, handleGetVaultMigrationStatus, handlePersistFormValues, handleStoreAccountKey, handleStoreUnlockKeyDerivationParams, handleStoreEncryptedVaultChunk, handleGetSyncState, handleMigrateVaultManifest, handleFullVaultSync, handleGroupCreateVault, handleGroupInviteMember, handleGroupUpdateVault, handleGroupLookupIdentityCode, handleGroupInviteMemberByCode, handleGroupAcceptManifestInvitation, handleCheckLoginDuplicate, handleSaveLoginCredential, handleAddUrlToCredential, handleIsUrlLinkedToCredential, handleGetLoginSaveSettings, handleGetItemsWithTotp, handleSearchItemsWithTotp, handleGetTotpCodes, handleGenerateTotpCode, handleGetAutofillCredential, handleRecordItemUsage, type AutofillSender } from '@/entrypoints/background/VaultMessageHandler';+import { handleCheckAuthStatus, handleClearPersistedFormValues, handleClearSession, handleClearVaultData, handleLockVault, handleGetFilteredItems, handleGetSearchItems, handleGetEncryptionKey, handleGetUnlockKeyDerivationParams, handleGetPersistedFormValues, handleGetVaultMigrationStatus, handlePersistFormValues, handleStoreAccountKey, handleStoreUnlockKeyDerivationParams, handleStoreEncryptedVaultChunk, handleGetSyncState, handleMigrateVaultManifest, handleFullVaultSync, handleGroupCreateVault, handleGroupInviteMember, handleGroupUpdateVault, handleGroupLookupAccountFingerprint, handleGroupInviteMemberByFingerprint, handleGroupAcceptManifestInvitation, handleCheckLoginDuplicate, handleSaveLoginCredential, handleAddUrlToCredential, handleIsUrlLinkedToCredential, handleGetLoginSaveSettings, handleGetItemsWithTotp, handleSearchItemsWithTotp, handleGetTotpCodes, handleGenerateTotpCode, handleGetAutofillCredential, handleRecordItemUsage, type AutofillSender } from '@/entrypoints/background/VaultMessageHandler';import { getCurrentAutofillFrameUrl } from '@/entrypoints/contentScript/AutofillFrameUrl';import { logFailure } from '@/utils/Diagnostics';@@ -316,8 +316,8 @@ export default defineBackground({onExtensionPageMessage('GROUP_CREATE_VAULT', ({ data }) => handleGroupCreateVault(data));onExtensionPageMessage('GROUP_UPDATE_VAULT', ({ data }) => handleGroupUpdateVault(data));onExtensionPageMessage('GROUP_INVITE_MEMBER', ({ data }) => handleGroupInviteMember(data));- onExtensionPageMessage('GROUP_LOOKUP_IDENTITY_CODE', ({ data }) => handleGroupLookupIdentityCode(data));- onExtensionPageMessage('GROUP_INVITE_MEMBER_BY_CODE', ({ data }) => handleGroupInviteMemberByCode(data));+ onExtensionPageMessage('GROUP_LOOKUP_ACCOUNT_FINGERPRINT', ({ data }) => handleGroupLookupAccountFingerprint(data));+ onExtensionPageMessage('GROUP_INVITE_MEMBER_BY_FINGERPRINT', ({ data }) => handleGroupInviteMemberByFingerprint(data));onExtensionPageMessage('GROUP_ACCEPT_MANIFEST_INVITATION', ({ data }) => handleGroupAcceptManifestInvitation(data));onExtensionPageMessage('LOCK_VAULT', () => handleLockVault());onExtensionPageMessage('CLEAR_SESSION', () => handleClearSession());diff --git a/apps/browser-extension/src/entrypoints/background/VaultMessageHandler.ts b/apps/browser-extension/src/entrypoints/background/VaultMessageHandler.tsindex 92b7d37e6..5150d3847 100644--- a/apps/browser-extension/src/entrypoints/background/VaultMessageHandler.ts+++ b/apps/browser-extension/src/entrypoints/background/VaultMessageHandler.ts@@ -14,7 +14,7 @@ import { applySearchFilter } from '@aliasvault/client/items/ItemFilters';import { generateTotpCode } from '@aliasvault/client/items/TotpUtility';import { getOrCreateDeviceId } from '@aliasvault/client/platform/DeviceId';import { filterItems, AutofillMatchingMode, extractRootDomain, isUrlAlreadyLinked } from '@aliasvault/client/rust/RustCore';-import { familySharingText } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText } from '@aliasvault/client/sharing/SharingView';import { clearDirtyScopes, getDirtyScopes } from '@aliasvault/client/sync/VaultDirtyState';import { vaultRequiresManifestMigration, VaultMigrationKind } from '@aliasvault/client/sync/VaultManifestMigration';import { type VaultMutationScope, DEFAULT_VAULT_MUTATION_SCOPE, hasUserVisibleScope } from '@aliasvault/client/sync/VaultMutationScope';@@ -1470,7 +1470,7 @@ async function sharingActionResponse(result: SharingOperationResult, failureMess}if (result.vaultUpgradeRequired) {- return { success: false, error: familySharingText.errors.vaultUpgradeRequired };+ return { success: false, error: sharingText.errors.vaultUpgradeRequired };}if (result.errorCode === AppErrorCode.VAULT_LOCKED) {@@ -1498,7 +1498,7 @@ export async function handleGroupCreateVault(message: { name: string }): Promiseawait handleFullVaultSync().catch(error => logFailure('Background sync after creating a shared manifest failed', error));}- return sharingActionResponse(result, familySharingText.errors.createVaultFailed);+ return sharingActionResponse(result, sharingText.errors.createVaultFailed);}/**@@ -1516,40 +1516,40 @@ export async function handleGroupUpdateVault(message: { groupId: string; manifes* @param message - the group, the manifest, and the person being invited.*/export async function handleGroupInviteMember(message: { groupId: string; manifestId: string; userId: string }): Promise<SharingActionResponse> {- return sharingActionResponse(await vaultSync.inviteToSharedManifest(message.groupId, message.manifestId, message.userId), familySharingText.errors.inviteFailed);+ return sharingActionResponse(await vaultSync.inviteToSharedManifest(message.groupId, message.manifestId, message.userId), sharingText.errors.inviteFailed);}/**- * Find the account behind an identity code and check the code against its key, without certifying or inviting it.+ * Find the account behind an account fingerprint and check the fingerprint against its key, without certifying or inviting it.*- * @param message - the folder's group (none while the folder is still personal) and the identity code.+ * @param message - the folder's group (none while the folder is still personal) and the account fingerprint.*/-export async function handleGroupLookupIdentityCode(message: { groupId?: string; identityCode: string }): Promise<SharingActionResponse> {- return sharingActionResponse(await vaultSync.lookupIdentityCode(message.groupId, message.identityCode), familySharingText.errors.inviteFailed);+export async function handleGroupLookupAccountFingerprint(message: { groupId?: string; accountFingerprint: string }): Promise<SharingActionResponse> {+ return sharingActionResponse(await vaultSync.lookupAccountFingerprint(message.groupId, message.accountFingerprint), sharingText.errors.inviteFailed);}/**- * Invite the account behind an identity code to a shared folder. The sync engine checks the key the server returns- * against the code and certifies it first; accepting makes the account a member of the folder's group.+ * Invite the account behind an account fingerprint to a shared folder. The sync engine checks the key the server returns+ * against the fingerprint and certifies it first; accepting makes the account a member of the folder's group.*- * @param message - the group, the manifest, and the identity code.+ * @param message - the group, the manifest, and the account fingerprint.*/-export async function handleGroupInviteMemberByCode(message: { groupId: string; manifestId: string; identityCode: string }): Promise<SharingActionResponse> {- return sharingActionResponse(await vaultSync.inviteToSharedManifestByCode(message.groupId, message.manifestId, message.identityCode), familySharingText.errors.inviteFailed);+export async function handleGroupInviteMemberByFingerprint(message: { groupId: string; manifestId: string; accountFingerprint: string }): Promise<SharingActionResponse> {+ return sharingActionResponse(await vaultSync.inviteToSharedManifestByFingerprint(message.groupId, message.manifestId, message.accountFingerprint), sharingText.errors.inviteFailed);}/*** Accept an invitation to a shared manifest: the sync engine signs the grant as this account's own, and the sync that* follows pulls the shared manifest.*- * @param message - the invitation and the inviter's identity code, when they are not verified yet.+ * @param message - the invitation and the inviter's account fingerprint, when they are not verified yet.*/-export async function handleGroupAcceptManifestInvitation(message: { invitationId: string; identityCode?: string }): Promise<SharingActionResponse> {- const result = await vaultSync.acceptSharedManifestInvitation(message.invitationId, message.identityCode);+export async function handleGroupAcceptManifestInvitation(message: { invitationId: string; accountFingerprint?: string }): Promise<SharingActionResponse> {+ const result = await vaultSync.acceptSharedManifestInvitation(message.invitationId, message.accountFingerprint);if (result.success) {await handleFullVaultSync();}- return sharingActionResponse(result, familySharingText.errors.invitationGone);+ return sharingActionResponse(result, sharingText.errors.invitationGone);}diff --git a/apps/browser-extension/src/entrypoints/popup/components/EmailPreview.tsx b/apps/browser-extension/src/entrypoints/popup/components/EmailPreview.tsxindex e9ec848d9..9b56b27cc 100644--- a/apps/browser-extension/src/entrypoints/popup/components/EmailPreview.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/EmailPreview.tsx@@ -3,7 +3,7 @@ import { type AliasOwnerNotice, aliasOwnerErrorText, aliasOwnerNotice, moveAliasimport { decryptEmailList } from '@aliasvault/client/email/EmailDecryption';import { SpamOkClient } from '@aliasvault/client/email/SpamOkClient';import { AppInfo } from '@aliasvault/client/platform/AppInfo';-import { familySharingText } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText } from '@aliasvault/client/sharing/SharingView';import { mailboxPollDelayMs } from '@aliasvault/client/utilities/PollBackoff';import React, { useState, useEffect, useRef } from 'react';import { useTranslation } from 'react-i18next';@@ -274,14 +274,14 @@ export const EmailPreview: React.FC<EmailPreviewProps> = ({ email, manifestId })onClick={() => setShowMoveConfirm(true)}className="mt-2 py-1 px-3 bg-primary-600 hover:bg-primary-700 text-white rounded-md text-sm">- {familySharingText.aliasOwner.moveHere}+ {sharingText.aliasOwner.moveHere}</button>)}<ModalisOpen={showMoveConfirm}onClose={() => setShowMoveConfirm(false)}onConfirm={() => void moveHere()}- title={familySharingText.aliasOwner.moveHere}+ title={sharingText.aliasOwner.moveHere}message={ownerNotice.moveConfirm}confirmText={t('common.confirm')}cancelText={t('common.cancel')}diff --git a/apps/browser-extension/src/entrypoints/popup/components/Folders/FolderIcon.tsx b/apps/browser-extension/src/entrypoints/popup/components/Folders/FolderIcon.tsxindex c89191a5c..4e56cdb37 100644--- a/apps/browser-extension/src/entrypoints/popup/components/Folders/FolderIcon.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/Folders/FolderIcon.tsx@@ -1,4 +1,4 @@-import { familySharingText } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText } from '@aliasvault/client/sharing/SharingView';import React from 'react';import Icon from '@/entrypoints/popup/components/Icons/Icon';@@ -28,7 +28,7 @@ const FolderIcon: React.FC<FolderIconProps> = ({)}{isShared && (<span- title={familySharingText.sharedVault}+ title={sharingText.sharedVault}className={`absolute -bottom-1 -right-1 flex items-center justify-center w-2.5 h-2.5 rounded-full ring-1 ${badgeClassName}`}><Icon name="users" className="w-2 h-2 text-primary-500 dark:text-primary-400" />diff --git a/apps/browser-extension/src/entrypoints/popup/components/Sharing/FamilyCodeDisplay.tsx b/apps/browser-extension/src/entrypoints/popup/components/Sharing/AccountFingerprint.tsxsimilarity index 72%rename from apps/browser-extension/src/entrypoints/popup/components/Sharing/FamilyCodeDisplay.tsxrename to apps/browser-extension/src/entrypoints/popup/components/Sharing/AccountFingerprint.tsxindex 6800de8af..eb898ed92 100644--- a/apps/browser-extension/src/entrypoints/popup/components/Sharing/FamilyCodeDisplay.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/Sharing/AccountFingerprint.tsx@@ -1,21 +1,21 @@-import { familySharingText } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText } from '@aliasvault/client/sharing/SharingView';import React, { useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';import Icon from '@/entrypoints/popup/components/Icons/Icon';-type FamilyCodeDisplayProps = {+type AccountFingerprintProps = {code: string;id?: string;className?: string;- /** A smaller pill, for showing the code inside other content. */+ /** A smaller pill, for showing the fingerprint inside other content. */isSmall?: boolean;};/**- * The user's own code in a pill; clicking anywhere on it copies the code.+ * The account's own fingerprint in a pill; clicking anywhere on it copies it.*/-const FamilyCodeDisplay: React.FC<FamilyCodeDisplayProps> = ({ code, id, className = '', isSmall = false }) => {+const AccountFingerprint: React.FC<AccountFingerprintProps> = ({ code, id, className = '', isSmall = false }) => {const { t } = useTranslation();const [copied, setCopied] = useState(false);@@ -28,21 +28,21 @@ const FamilyCodeDisplay: React.FC<FamilyCodeDisplayProps> = ({ code, id, classNa}, [copied]);/**- * Copy the code. It is not secret, so it stays on the clipboard instead of going through the auto-clearing copy.+ * Copy the fingerprint. It is not secret, so it stays on the clipboard instead of going through the auto-clearing copy.*/const copy = async (): Promise<void> => {try {await navigator.clipboard.writeText(code);setCopied(true);} catch {- // Clipboard access denied; the code stays visible to copy by hand.+ // Clipboard access denied; the fingerprint stays visible to copy by hand.}};return (<button type="button" onClick={() => void copy()} title={t('common.copyToClipboard')} className={`inline-flex flex-wrap items-center rounded-full text-left bg-primary-50 hover:bg-primary-100 dark:bg-primary-900/30 dark:hover:bg-primary-900/50 border border-primary-200 dark:border-primary-800 ${isSmall ? 'gap-x-1.5 gap-y-0.5 pl-2.5 pr-1 py-0.5' : 'gap-x-2 gap-y-1 px-3 py-1.5'} ${className}`}><Icon name="shield-check" className={`${isSmall ? 'w-3.5 h-3.5' : 'w-4 h-4'} shrink-0 text-primary-500`} />- <span className="text-xs text-gray-700 dark:text-gray-300">{familySharingText.yourCode}</span>+ <span className="text-xs text-gray-700 dark:text-gray-300">{sharingText.yourFingerprint}</span><span id={id} className={`font-mono ${isSmall ? 'text-xs' : 'text-sm'} font-semibold tracking-wider whitespace-nowrap text-gray-900 dark:text-white`}>{code}</span><span className="inline-flex items-center gap-1 p-1 text-primary-600 dark:text-primary-400"><Icon name={copied ? 'check' : 'duplicate'} className={isSmall ? 'w-3.5 h-3.5' : 'w-4 h-4'} />@@ -52,4 +52,4 @@ const FamilyCodeDisplay: React.FC<FamilyCodeDisplayProps> = ({ code, id, classNa);};-export default FamilyCodeDisplay;+export default AccountFingerprint;diff --git a/apps/browser-extension/src/entrypoints/popup/components/Sharing/InviteMemberWizard.tsx b/apps/browser-extension/src/entrypoints/popup/components/Sharing/InviteMemberWizard.tsxindex 89e9b9658..60594b736 100644--- a/apps/browser-extension/src/entrypoints/popup/components/Sharing/InviteMemberWizard.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/Sharing/InviteMemberWizard.tsx@@ -1,11 +1,11 @@-import { familySharingText, splitAround } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText, splitAround } from '@aliasvault/client/sharing/SharingView';import React, { useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';import ModalWrapper from '@/entrypoints/popup/components/Dialogs/ModalWrapper';import Icon from '@/entrypoints/popup/components/Icons/Icon';import InlineSpinner from '@/entrypoints/popup/components/InlineSpinner';-import FamilyCodeDisplay from '@/entrypoints/popup/components/Sharing/FamilyCodeDisplay';+import AccountFingerprint from '@/entrypoints/popup/components/Sharing/AccountFingerprint';/*** `text` with `value` in bold.@@ -17,11 +17,11 @@ const emphasized = (text: string, value: string): React.ReactNode => {return <>{before}<strong className="font-semibold text-gray-900 dark:text-white">{bold}</strong>{after}</>;};-/** The account a code belongs to. */-export type FamilyCodeAccount = { username: string };+/** The account an account fingerprint belongs to. */+export type AccountLookupResult = { username: string };/**- * Somebody verified before, who can be invited without their code.+ * Somebody verified before, who can be invited without their account fingerprint.*/export type KnownPerson = {userId: string;@@ -32,17 +32,17 @@ export type KnownPerson = {type InviteMemberWizardProps = {isOpen: boolean;- /** This account's own code, which the invitee needs to accept. */- ownCode: string | null;+ /** This account's own fingerprint, which the invitee needs to accept. */+ ownFingerprint: string | null;/** The folder the invitation is for. */folderName: string;/** Whether inviting turns a personal folder into a shared one. */sharesFolder?: boolean;- /** The people verified before who are not in the folder yet, offered before the code field. */+ /** The people verified before who are not in the folder yet, offered before the fingerprint field. */people?: KnownPerson[];- /** Find the account behind a code; throws an error with the message to show. */- onLookup: (code: string) => Promise<FamilyCodeAccount>;- /** Invite the account behind a code; throws an error with the message to show. */+ /** Find the account behind an account fingerprint; throws an error with the message to show. */+ onLookup: (code: string) => Promise<AccountLookupResult>;+ /** Invite the account behind an account fingerprint; throws an error with the message to show. */onInvite: (code: string) => Promise<void>;/** Invite somebody verified before; throws an error with the message to show. */onInvitePerson?: (userId: string) => Promise<void>;@@ -59,15 +59,15 @@ const PRIMARY_CLASS = 'px-4 py-2 text-sm font-medium text-white bg-primary-600 hconst SECONDARY_CLASS = 'px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 disabled:opacity-50';/**- * Three step wizard that picks somebody verified before or takes a new person's code, confirms who gets invited, and hands- * out this account's own code for them to accept with.+ * Three step wizard that picks somebody verified before or takes a new person's account fingerprint, confirms who gets invited, and hands+ * out this account's own fingerprint for them to accept with.*/-const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownCode, folderName, sharesFolder = false, people = [], onLookup, onInvite, onInvitePerson, onClose }) => {+const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownFingerprint, folderName, sharesFolder = false, people = [], onLookup, onInvite, onInvitePerson, onClose }) => {const { t } = useTranslation();const [step, setStep] = useState(1);const [code, setCode] = useState('');- const [account, setAccount] = useState<FamilyCodeAccount | null>(null);- /** The person verified before who was picked instead of entering a code. */+ const [account, setAccount] = useState<AccountLookupResult | null>(null);+ /** The person verified before who was picked instead of entering a fingerprint. */const [selected, setSelected] = useState<KnownPerson | null>(null);const [error, setError] = useState<string | null>(null);const [isBusy, setIsBusy] = useState(false);@@ -110,7 +110,7 @@ const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownCode};/**- * Ask to confirm the person picked, or look the code up first and ask to confirm who it belongs to.+ * Ask to confirm the person picked, or look the fingerprint up first and ask to confirm who it belongs to.*/const lookup = (): Promise<void> => runStep(async () => {setAccount(selected ? { username: selected.username } : await onLookup(trimmedCode));@@ -118,7 +118,7 @@ const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownCode});/**- * Invite the person picked or the account behind the code, then show this account's own code.+ * Invite the person picked or the account behind the account fingerprint, then show this account's own fingerprint.*/const invite = (): Promise<void> => runStep(async () => {if (selected && onInvitePerson) {@@ -146,13 +146,13 @@ const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownCode{step === 1 && <button type="button" onClick={close} disabled={isBusy} className={SECONDARY_CLASS}>{t('common.cancel')}</button>}{step === 1 && <button id="invite-wizard-next" type="submit" form="invite-member-form" disabled={isBusy || (selected === null && trimmedCode.length === 0)} className={PRIMARY_CLASS}>{t('common.next')}</button>}{step === 2 && <button type="button" onClick={() => setStep(1)} disabled={isBusy} className={SECONDARY_CLASS}>{t('common.back')}</button>}- {step === 2 && <button id="invite-wizard-confirm" type="button" onClick={() => void invite()} disabled={isBusy} className={PRIMARY_CLASS}>{familySharingText.invite}</button>}- {step === 3 && <button id="invite-wizard-close" type="button" onClick={close} disabled={!canClose} className={PRIMARY_CLASS}>{closeCountdown > 0 ? familySharingText.closeCountdown(closeCountdown) : t('common.close')}</button>}+ {step === 2 && <button id="invite-wizard-confirm" type="button" onClick={() => void invite()} disabled={isBusy} className={PRIMARY_CLASS}>{sharingText.invite}</button>}+ {step === 3 && <button id="invite-wizard-close" type="button" onClick={close} disabled={!canClose} className={PRIMARY_CLASS}>{closeCountdown > 0 ? sharingText.closeCountdown(closeCountdown) : t('common.close')}</button>}</div>);return (- <ModalWrapper isOpen={isOpen} onClose={close} title={familySharingText.invitePeople} showCloseButton={canClose} footer={footer}>+ <ModalWrapper isOpen={isOpen} onClose={close} title={sharingText.invitePeople} showCloseButton={canClose} footer={footer}>{/* Progress through the three steps. */}<div className="mb-4"><div className="flex gap-2" aria-hidden="true">@@ -160,11 +160,11 @@ const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownCode<div key={index} className={`h-1.5 flex-1 rounded-full ${index < step ? 'bg-primary-500' : 'bg-gray-200 dark:bg-gray-700'}`} />))}</div>- <p className="mt-2 text-xs text-gray-500 dark:text-gray-400">{familySharingText.wizardStep(step, STEP_COUNT)}</p>+ <p className="mt-2 text-xs text-gray-500 dark:text-gray-400">{sharingText.wizardStep(step, STEP_COUNT)}</p></div>- {/* While a step works (looking the code up, or sharing the folder and sending the invitation) its content makes way for a spinner. */}- {isBusy && <InlineSpinner text={step === 2 && sharesFolder ? familySharingText.wizardCreating : t('common.loading')} />}+ {/* While a step works (looking the fingerprint up, or sharing the folder and sending the invitation) its content makes way for a spinner. */}+ {isBusy && <InlineSpinner text={step === 2 && sharesFolder ? sharingText.wizardCreating : t('common.loading')} />}{step === 1 && !isBusy && (<form@@ -177,10 +177,10 @@ const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownCode}}}>- {/* Somebody verified before needs no code; picking them and entering a code exclude each other. */}+ {/* Somebody verified before needs no fingerprint; picking them and entering one exclude each other. */}{people.length > 0 && (<div className="space-y-2">- <h4 className="text-base font-medium text-gray-900 dark:text-white">{familySharingText.inviteWizardChooseTitle}</h4>+ <h4 className="text-base font-medium text-gray-900 dark:text-white">{sharingText.inviteWizardChooseTitle}</h4><ul className="space-y-2">{people.map(person => {const isSelected = selected?.userId === person.userId;@@ -208,17 +208,17 @@ const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownCode)}<div className="space-y-3">- <h4 className="text-base font-medium text-gray-900 dark:text-white">{people.length > 0 ? familySharingText.inviteWizardNewCodeTitle : familySharingText.inviteWizardCodeTitle}</h4>- <p className="text-sm text-gray-500 dark:text-gray-400">{familySharingText.inviteWizardCodeHint}</p>+ <h4 className="text-base font-medium text-gray-900 dark:text-white">{people.length > 0 ? sharingText.inviteWizardNewFingerprintTitle : sharingText.inviteWizardFingerprintTitle}</h4>+ <p className="text-sm text-gray-500 dark:text-gray-400">{sharingText.inviteWizardFingerprintHint}</p><input- id="invite-wizard-code"+ id="invite-wizard-fingerprint"type="text"value={code}onChange={event => {setCode(event.target.value);setSelected(null);}}- placeholder={familySharingText.codePlaceholder}+ placeholder={sharingText.fingerprintPlaceholder}autoFocus={people.length === 0}className={INPUT_CLASS}/>@@ -228,8 +228,8 @@ const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownCode{step === 2 && account && !isBusy && (<div className="space-y-3">- <h4 className="text-base font-medium text-gray-900 dark:text-white">{familySharingText.inviteWizardConfirmTitle}</h4>- <p className="text-sm text-gray-600 dark:text-gray-300">{emphasized(sharesFolder ? familySharingText.inviteWizardConfirmShare(account.username, folderName) : familySharingText.inviteWizardConfirmFolder(account.username, folderName), account.username)}</p>+ <h4 className="text-base font-medium text-gray-900 dark:text-white">{sharingText.inviteWizardConfirmTitle}</h4>+ <p className="text-sm text-gray-600 dark:text-gray-300">{emphasized(sharesFolder ? sharingText.inviteWizardConfirmShare(account.username, folderName) : sharingText.inviteWizardConfirmFolder(account.username, folderName), account.username)}</p></div>)}@@ -237,14 +237,14 @@ const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownCode<div className="space-y-4"><div className="flex items-center gap-2"><Icon name="check-circle" className="w-6 h-6 shrink-0 text-green-600 dark:text-green-400" />- <h4 className="text-base font-medium text-gray-900 dark:text-white">{emphasized(familySharingText.inviteWizardInvited(account.username), account.username)}</h4>+ <h4 className="text-base font-medium text-gray-900 dark:text-white">{emphasized(sharingText.inviteWizardInvited(account.username), account.username)}</h4></div>- {/* What is left to do: the invitee types this code to accept. */}+ {/* What is left to do: the invitee types this fingerprint to accept. */}<div className="space-y-3 rounded-lg border border-gray-200 p-3 dark:border-gray-700">- <h5 className="text-sm font-semibold text-gray-900 dark:text-white">{familySharingText.inviteWizardNextStep}</h5>- <p className="text-sm text-gray-600 dark:text-gray-300">{emphasized(familySharingText.inviteWizardShareHint(account.username), account.username)}</p>- {ownCode && <FamilyCodeDisplay code={ownCode} />}- <p className="text-xs text-gray-500 dark:text-gray-400">{familySharingText.inviteWizardShareNotSecret}</p>+ <h5 className="text-sm font-semibold text-gray-900 dark:text-white">{sharingText.inviteWizardNextStep}</h5>+ <p className="text-sm text-gray-600 dark:text-gray-300">{emphasized(sharingText.inviteWizardShareHint(account.username), account.username)}</p>+ {ownFingerprint && <AccountFingerprint code={ownFingerprint} />}+ <p className="text-xs text-gray-500 dark:text-gray-400">{sharingText.inviteWizardShareNotSecret}</p></div></div>)}diff --git a/apps/browser-extension/src/entrypoints/popup/components/Sharing/SharedFolderAccessModal.tsx b/apps/browser-extension/src/entrypoints/popup/components/Sharing/SharedFolderAccessModal.tsxindex 013a2d38c..8c4b0b390 100644--- a/apps/browser-extension/src/entrypoints/popup/components/Sharing/SharedFolderAccessModal.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/Sharing/SharedFolderAccessModal.tsx@@ -1,5 +1,5 @@-import { canAdministerGroup, describeMemberAccess, familySharingText, hasOtherPeople, holdsManifestKey, invitablePeople, memberKeyProblem, pendingInvitees, roleLabel, sharingView, type SharedFolder } from '@aliasvault/client/sharing/FamilySharingView';import { SharingService } from '@aliasvault/client/sharing/SharingService';+import { canAdministerGroup, describeMemberAccess, sharingText, hasOtherPeople, holdsManifestKey, invitablePeople, memberKeyProblem, pendingInvitees, roleLabel, sharingView, type SharedFolder } from '@aliasvault/client/sharing/SharingView';import React, { useEffect, useRef, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -7,8 +7,8 @@ import AlertMessage from '@/entrypoints/popup/components/AlertMessage';import ModalWrapper from '@/entrypoints/popup/components/Dialogs/ModalWrapper';import Icon from '@/entrypoints/popup/components/Icons/Icon';import InlineSpinner from '@/entrypoints/popup/components/InlineSpinner';-import FamilyCodeDisplay from '@/entrypoints/popup/components/Sharing/FamilyCodeDisplay';-import InviteMemberWizard, { type FamilyCodeAccount } from '@/entrypoints/popup/components/Sharing/InviteMemberWizard';+import AccountFingerprint from '@/entrypoints/popup/components/Sharing/AccountFingerprint';+import InviteMemberWizard, { type AccountLookupResult } from '@/entrypoints/popup/components/Sharing/InviteMemberWizard';import { useDb } from '@/entrypoints/popup/context/DbContext';import { useWebApi } from '@/entrypoints/popup/context/WebApiContext';import { usePasswordConfirmedAction } from '@/entrypoints/popup/hooks/usePasswordConfirmedAction';@@ -39,7 +39,7 @@ type SharedFolderAccessModalProps = {};/**- * The people of a folder: who has access, inviting someone new by their code or somebody verified before, and taking+ * The people of a folder: who has access, inviting someone new by their account fingerprint or somebody verified before, and taking* access away. A personal folder becomes a shared folder on its first invitation.*/const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ folder, isShared, shared, onMoved, onLeft, onClose }) => {@@ -119,7 +119,7 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ folde}if (isShared) {// A shared folder whose people have not loaded yet; never share it a second time.- throw new SharingOperationError(familySharingText.errors.inviteFailed);+ throw new SharingOperationError(sharingText.errors.inviteFailed);}// The background syncs the new shared folder to the server before it answers.@@ -131,14 +131,14 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ foldeawait writeAndPush(async () => {const client = getSqliteClient();if (!client) {- throw new SharingOperationError(familySharingText.errors.createVaultFailed);+ throw new SharingOperationError(sharingText.errors.createVaultFailed);}await client.folders.moveContentsToManifest({ Id: folder.Id, ManifestId: folder.ManifestId }, manifestId);- }, familySharingText.errors.createVaultFailed);+ }, sharingText.errors.createVaultFailed);const created = sharingView(await SharingService.getOverview(webApi)).folders.find(candidate => candidate.manifest.manifestId.toLowerCase() === manifestId) ?? null;if (!created) {- throw new SharingOperationError(familySharingText.errors.createVaultFailed);+ throw new SharingOperationError(sharingText.errors.createVaultFailed);}onMoved({ Id: manifestId, ManifestId: manifestId }, true);return created;@@ -153,41 +153,41 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ foldeconst target = await ensureShared();unwrapSharingResult(await sendMessage('GROUP_INVITE_MEMBER', { groupId: target.group.groupId, manifestId: target.manifest.manifestId, userId }));await loadStoredDatabase();- setInviteNotice(familySharingText.invitationSent(shared.verifiedPeople.find(person => person.userId === userId)?.username ?? ''));+ setInviteNotice(sharingText.invitationSent(shared.verifiedPeople.find(person => person.userId === userId)?.username ?? ''));} catch (inviteError) {- throw new Error(sharingFailureMessage(inviteError, familySharingText.errors.inviteFailed));+ throw new Error(sharingFailureMessage(inviteError, sharingText.errors.inviteFailed));} finally {await shared.reload();}};/**- * Find the account behind a code for the invite wizard, also before the folder is shared. Throws an error with the message to show.- * @param code - the code entered.+ * Find the account behind an account fingerprint for the invite wizard, also before the folder is shared. Throws an error with the message to show.+ * @param code - the account fingerprint entered.*/- const lookup = async (code: string): Promise<FamilyCodeAccount> => {+ const lookup = async (code: string): Promise<AccountLookupResult> => {try {- const result = unwrapSharingResult(await sendMessage('GROUP_LOOKUP_IDENTITY_CODE', { groupId: current?.group.groupId, identityCode: code }));+ const result = unwrapSharingResult(await sendMessage('GROUP_LOOKUP_ACCOUNT_FINGERPRINT', { groupId: current?.group.groupId, accountFingerprint: code }));if (result.alreadyMember) {- throw new SharingOperationError(familySharingText.errors.alreadyHasAccess);+ throw new SharingOperationError(sharingText.errors.alreadyHasAccess);}return { username: result.username ?? '' };} catch (lookupError) {- throw new Error(sharingFailureMessage(lookupError, familySharingText.errors.inviteFailed));+ throw new Error(sharingFailureMessage(lookupError, sharingText.errors.inviteFailed));}};/**- * Invite the account behind a code, sharing a personal folder at this point; the sync engine checks its key against the code and certifies it.- * @param code - the code entered.+ * Invite the account behind an account fingerprint, sharing a personal folder at this point; the sync engine checks its key against the fingerprint and certifies it.+ * @param code - the account fingerprint entered.*/- const inviteByCode = async (code: string): Promise<void> => {+ const inviteByFingerprint = async (code: string): Promise<void> => {try {const target = await ensureShared();- const result = unwrapSharingResult(await sendMessage('GROUP_INVITE_MEMBER_BY_CODE', { groupId: target.group.groupId, manifestId: target.manifest.manifestId, identityCode: code }));- setInviteNotice(familySharingText.invitationSent(result.username ?? ''));+ const result = unwrapSharingResult(await sendMessage('GROUP_INVITE_MEMBER_BY_FINGERPRINT', { groupId: target.group.groupId, manifestId: target.manifest.manifestId, accountFingerprint: code }));+ setInviteNotice(sharingText.invitationSent(result.username ?? ''));} catch (inviteError) {- throw new Error(sharingFailureMessage(inviteError, familySharingText.errors.inviteFailed));+ throw new Error(sharingFailureMessage(inviteError, sharingText.errors.inviteFailed));} finally {await shared.reload();}@@ -209,12 +209,12 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ foldeawait writeAndPush(async () => {const client = getSqliteClient();if (!client) {- throw new SharingOperationError(familySharingText.errors.revokeAccessFailed);+ throw new SharingOperationError(sharingText.errors.revokeAccessFailed);}personal = await client.folders.moveManifestToNewFolder(manifestId, folder.Name);- }, familySharingText.errors.revokeAccessFailed);+ }, sharingText.errors.revokeAccessFailed);await SharingService.unshareSharedManifest(webApi, latest.group.groupId, manifestId);- await syncVault(familySharingText.errors.revokeAccessFailed);+ await syncVault(sharingText.errors.revokeAccessFailed);await loadStoredDatabase();await shared.reload();if (personal) {@@ -244,11 +244,11 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ folde*/const removeAccess = (target: SharedFolder, member: GroupMemberInfo, isSelf: boolean): void => {askPassword({- title: isSelf ? familySharingText.leaveVault : familySharingText.revoke,- confirmMessage: isSelf ? familySharingText.leaveVaultConfirm(folder.Name) : familySharingText.revokeAccessConfirm(member.username, folder.Name),- confirmText: isSelf ? familySharingText.leaveVault : familySharingText.revoke,- description: isSelf ? familySharingText.leaveVaultPasswordPrompt(folder.Name) : familySharingText.revokeAccessPasswordPrompt(member.username, folder.Name),- failureMessage: familySharingText.errors.revokeAccessFailed,+ title: isSelf ? sharingText.leaveVault : sharingText.revoke,+ confirmMessage: isSelf ? sharingText.leaveVaultConfirm(folder.Name) : sharingText.revokeAccessConfirm(member.username, folder.Name),+ confirmText: isSelf ? sharingText.leaveVault : sharingText.revoke,+ description: isSelf ? sharingText.leaveVaultPasswordPrompt(folder.Name) : sharingText.revokeAccessPasswordPrompt(member.username, folder.Name),+ failureMessage: sharingText.errors.revokeAccessFailed,/*** Run the action with the password proof.* @param answerChallenge - answers the SRP challenge.@@ -263,7 +263,7 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ foldesetError(null);setNotice(null);try {- await syncVault(familySharingText.errors.revokeAccessFailed);+ await syncVault(sharingText.errors.revokeAccessFailed);await loadStoredDatabase();if (!isSelf) {// Taking the last other person out makes the folder personal again.@@ -271,7 +271,7 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ folde}await shared.reload();} catch (revertError) {- setError(sharingFailureMessage(revertError, familySharingText.errors.revokeAccessFailed));+ setError(sharingFailureMessage(revertError, sharingText.errors.revokeAccessFailed));} finally {setBusy(false);}@@ -293,7 +293,7 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ foldereturn;}revertCheckedRef.current = emptyOwnedManifestId;- void run(() => revertIfEmpty(emptyOwnedManifestId), familySharingText.errors.revokeAccessFailed);+ void run(() => revertIfEmpty(emptyOwnedManifestId), sharingText.errors.revokeAccessFailed);// eslint-disable-next-line react-hooks/exhaustive-deps}, [emptyOwnedManifestId]);@@ -306,15 +306,15 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ folde{error && <AlertMessage type="error" message={error} />}{notice && <AlertMessage type="success" message={notice} />}- {!isShared && <p className="text-sm text-gray-600 dark:text-gray-400">{familySharingText.shareFolderHint}</p>}+ {!isShared && <p className="text-sm text-gray-600 dark:text-gray-400">{sharingText.shareFolderHint}</p>}{/* The people with access, with a + to invite more; only listed once anybody besides this account is in. */}{current && hasOthers && (<div><div className="mb-1 flex items-center justify-between gap-2">- <h4 className="text-sm font-medium text-gray-900 dark:text-white">{familySharingText.peopleTitle}</h4>+ <h4 className="text-sm font-medium text-gray-900 dark:text-white">{sharingText.peopleTitle}</h4>{canInvite && (- <button id="invite-someone-new" disabled={busy} onClick={() => setIsInviteOpen(true)} title={familySharingText.invitePeople} aria-label={familySharingText.invitePeople} className="p-1.5 rounded-md text-primary-600 hover:bg-primary-50 dark:text-primary-400 dark:hover:bg-primary-900/30 disabled:opacity-50">+ <button id="invite-someone-new" disabled={busy} onClick={() => setIsInviteOpen(true)} title={sharingText.invitePeople} aria-label={sharingText.invitePeople} className="p-1.5 rounded-md text-primary-600 hover:bg-primary-50 dark:text-primary-400 dark:hover:bg-primary-900/30 disabled:opacity-50"><Icon name="plus" className="w-4 h-4" /></button>)}@@ -325,11 +325,11 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ foldereturn (<li key={member.userId} className="flex items-center justify-between gap-2 py-1.5" data-person={member.username}><div className="min-w-0">- <p className="text-sm text-gray-900 dark:text-white truncate">{member.username}{access.isSelf && ` (${familySharingText.you})`}</p>+ <p className="text-sm text-gray-900 dark:text-white truncate">{member.username}{access.isSelf && ` (${sharingText.you})`}</p><p className="text-xs text-gray-500 dark:text-gray-400">{roleLabel(member)}</p></div>- {access.canLeave && <button disabled={busy} onClick={() => removeAccess(current, member, true)} className={SMALL_DANGER_CLASS}>{familySharingText.leaveVault}</button>}- {access.canRevoke && <button disabled={busy} onClick={() => removeAccess(current, member, false)} className={SMALL_DANGER_CLASS}>{familySharingText.revoke}</button>}+ {access.canLeave && <button disabled={busy} onClick={() => removeAccess(current, member, true)} className={SMALL_DANGER_CLASS}>{sharingText.leaveVault}</button>}+ {access.canRevoke && <button disabled={busy} onClick={() => removeAccess(current, member, false)} className={SMALL_DANGER_CLASS}>{sharingText.revoke}</button>}</li>);})}@@ -337,17 +337,17 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ folde<li key={invitation.id} className="flex items-center justify-between gap-2 py-1.5" data-person={invitation.inviteeUsername}><div className="min-w-0"><p className="text-sm text-gray-900 dark:text-white truncate">{invitation.inviteeUsername}</p>- <p className="text-xs text-gray-500 dark:text-gray-400">{familySharingText.invited}</p>+ <p className="text-xs text-gray-500 dark:text-gray-400">{sharingText.invited}</p></div><buttondisabled={busy}onClick={() => void run(async () => {await SharingService.withdrawInvitation(webApi, invitation.id);await revertIfEmpty(current.manifest.manifestId);- }, familySharingText.errors.invitationGone)}+ }, sharingText.errors.invitationGone)}className={SMALL_NEUTRAL_CLASS}>- {familySharingText.withdraw}+ {sharingText.withdraw}</button></li>))}@@ -355,20 +355,20 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ folde</div>)}- {/* While an invitation waits, the code the invitee types to accept it is at hand here too. */}- {current && canAdministerGroup(current.group) && pendingInvitees(current).length > 0 && shared.ownCode && (+ {/* While an invitation waits, the fingerprint the invitee types to accept it is at hand here too. */}+ {current && canAdministerGroup(current.group) && pendingInvitees(current).length > 0 && shared.ownFingerprint && (<div className="space-y-1.5">- <p className="text-xs text-gray-500 dark:text-gray-400">{familySharingText.pendingCodeTip}</p>- <FamilyCodeDisplay code={shared.ownCode} isSmall />+ <p className="text-xs text-gray-500 dark:text-gray-400">{sharingText.pendingFingerprintTip}</p>+ <AccountFingerprint code={shared.ownFingerprint} isSmall /></div>)}{/* Nobody else in yet (or still a personal folder): inviting is the one thing to do, so it is shown prominently. */}- {current && !hasOthers && <p className="text-sm text-gray-600 dark:text-gray-400">{familySharingText.notSharedYet}</p>}+ {current && !hasOthers && <p className="text-sm text-gray-600 dark:text-gray-400">{sharingText.notSharedYet}</p>}{canInvite && !hasOthers && (<button id="invite-someone-new" disabled={busy} onClick={() => setIsInviteOpen(true)} className={`${PRIMARY_BUTTON_CLASS} inline-flex items-center gap-1.5`}><Icon name="plus" className="w-4 h-4" />- {familySharingText.invitePeople}+ {sharingText.invitePeople}</button>)}</div>@@ -378,10 +378,10 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ foldeisOpen={isInviteOpen}sharesFolder={!isShared}folderName={folder.Name}- ownCode={shared.ownCode}+ ownFingerprint={shared.ownFingerprint}people={invitable.map(person => ({ userId: person.userId, username: person.username, problem: memberKeyProblem(person) }))}onLookup={lookup}- onInvite={inviteByCode}+ onInvite={inviteByFingerprint}onInvitePerson={inviteKnown}onClose={() => {setIsInviteOpen(false);diff --git a/apps/browser-extension/src/entrypoints/popup/components/Sharing/SharedFolderInvitationModal.tsx b/apps/browser-extension/src/entrypoints/popup/components/Sharing/SharedFolderInvitationModal.tsxindex 402ddbfd9..aeff09c61 100644--- a/apps/browser-extension/src/entrypoints/popup/components/Sharing/SharedFolderInvitationModal.tsx+++ b/apps/browser-extension/src/entrypoints/popup/components/Sharing/SharedFolderInvitationModal.tsx@@ -1,5 +1,5 @@-import { familySharingText, isInviterVerified } from '@aliasvault/client/sharing/FamilySharingView';import { SharingService } from '@aliasvault/client/sharing/SharingService';+import { sharingText, isInviterVerified } from '@aliasvault/client/sharing/SharingView';import React, { useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -24,12 +24,12 @@ type SharedFolderInvitationModalProps = {/*** An invitation to a shared folder: accept or decline it. Accepting from an inviter this account has not verified yet- * first asks for their code.+ * first asks for their account fingerprint.*/const SharedFolderInvitationModal: React.FC<SharedFolderInvitationModalProps> = ({ invitation, folderName, onDone, onClose }) => {const { t } = useTranslation();const webApi = useWebApi();- const [askCode, setAskCode] = useState(false);+ const [askFingerprint, setAskCode] = useState(false);const [code, setCode] = useState('');const [error, setError] = useState<string | null>(null);const [busy, setBusy] = useState(false);@@ -45,14 +45,14 @@ const SharedFolderInvitationModal: React.FC<SharedFolderInvitationModalProps> =}/**- * Accept, with the inviter's code when it was asked for; an engine that holds no certification of the inviter asks for it.+ * Accept, with the inviter's account fingerprint when it was asked for; an engine that holds no certification of the inviter asks for it.*/const accept = async (): Promise<void> => {- if (!askCode && !isInviterVerified(invitation)) {+ if (!askFingerprint && !isInviterVerified(invitation)) {setAskCode(true);return;}- if (askCode && code.trim().length === 0) {+ if (askFingerprint && code.trim().length === 0) {return;}@@ -60,14 +60,14 @@ const SharedFolderInvitationModal: React.FC<SharedFolderInvitationModalProps> =setError(null);try {// The background syncs after accepting, which pulls the shared folder.- const result = await sendMessage('GROUP_ACCEPT_MANIFEST_INVITATION', { invitationId: invitation.id, identityCode: askCode ? code.trim() : undefined });+ const result = await sendMessage('GROUP_ACCEPT_MANIFEST_INVITATION', { invitationId: invitation.id, accountFingerprint: askFingerprint ? code.trim() : undefined });if (result.apiErrorCode === 'INVITER_NOT_VERIFIED') {setAskCode(true);}unwrapSharingResult(result);await onDone(true);} catch (acceptError) {- setError(sharingFailureMessage(acceptError, familySharingText.errors.invitationGone));+ setError(sharingFailureMessage(acceptError, sharingText.errors.invitationGone));} finally {setBusy(false);}@@ -83,7 +83,7 @@ const SharedFolderInvitationModal: React.FC<SharedFolderInvitationModalProps> =await SharingService.declineInvitation(webApi, invitation.id);await onDone(false);} catch (declineError) {- setError(sharingFailureMessage(declineError, familySharingText.errors.invitationGone));+ setError(sharingFailureMessage(declineError, sharingText.errors.invitationGone));} finally {setBusy(false);}@@ -91,9 +91,9 @@ const SharedFolderInvitationModal: React.FC<SharedFolderInvitationModalProps> =const footer = (<div className="flex justify-end gap-2">- {!askCode && <button type="button" disabled={busy} onClick={() => void decline()} className={SECONDARY_BUTTON_CLASS}>{familySharingText.decline}</button>}- {askCode && <button type="button" disabled={busy} onClick={() => setAskCode(false)} className={SECONDARY_BUTTON_CLASS}>{t('common.back')}</button>}- <button id="accept-invitation" type="submit" form="shared-folder-invitation-form" disabled={busy || (askCode && code.trim().length === 0)} className={PRIMARY_BUTTON_CLASS}>{familySharingText.accept}</button>+ {!askFingerprint && <button type="button" disabled={busy} onClick={() => void decline()} className={SECONDARY_BUTTON_CLASS}>{sharingText.decline}</button>}+ {askFingerprint && <button type="button" disabled={busy} onClick={() => setAskCode(false)} className={SECONDARY_BUTTON_CLASS}>{t('common.back')}</button>}+ <button id="accept-invitation" type="submit" form="shared-folder-invitation-form" disabled={busy || (askFingerprint && code.trim().length === 0)} className={PRIMARY_BUTTON_CLASS}>{sharingText.accept}</button></div>);@@ -101,7 +101,7 @@ const SharedFolderInvitationModal: React.FC<SharedFolderInvitationModalProps> =<ModalWrapperisOpenonClose={onClose}- title={askCode ? familySharingText.inviterCodeTitle(invitation.inviterUsername) : familySharingText.sharedWithYou(invitation.inviterUsername, folderName)}+ title={askFingerprint ? sharingText.inviterFingerprintTitle(invitation.inviterUsername) : sharingText.sharedWithYou(invitation.inviterUsername, folderName)}footer={footer}><form@@ -112,16 +112,16 @@ const SharedFolderInvitationModal: React.FC<SharedFolderInvitationModalProps> =void accept();}}>- {!askCode && (+ {!askFingerprint && (<>- <p className="text-sm text-gray-600 dark:text-gray-300">{familySharingText.sharedWithYouHint}</p>- <p className="text-sm text-gray-500 dark:text-gray-400">{isInviterVerified(invitation) ? familySharingText.invitedByVerified(invitation.inviterUsername) : familySharingText.invitedBy(invitation.inviterUsername)}</p>+ <p className="text-sm text-gray-600 dark:text-gray-300">{sharingText.sharedWithYouHint}</p>+ <p className="text-sm text-gray-500 dark:text-gray-400">{isInviterVerified(invitation) ? sharingText.invitedByVerified(invitation.inviterUsername) : sharingText.invitedBy(invitation.inviterUsername)}</p></>)}- {askCode && (+ {askFingerprint && (<>- <p className="text-sm text-gray-600 dark:text-gray-300">{familySharingText.inviterCodeExplanation(invitation.inviterUsername)}</p>- <input id="inviter-code" type="text" className={INPUT_CLASS} value={code} onChange={event => setCode(event.target.value)} placeholder={familySharingText.codePlaceholder} autoFocus />+ <p className="text-sm text-gray-600 dark:text-gray-300">{sharingText.inviterFingerprintExplanation(invitation.inviterUsername)}</p>+ <input id="inviter-fingerprint" type="text" className={INPUT_CLASS} value={code} onChange={event => setCode(event.target.value)} placeholder={sharingText.fingerprintPlaceholder} autoFocus /></>)}{error && <p className="text-sm text-red-600 dark:text-red-400">{error}</p>}diff --git a/apps/browser-extension/src/entrypoints/popup/hooks/useSharedFolders.ts b/apps/browser-extension/src/entrypoints/popup/hooks/useSharedFolders.tsindex 181c1e31b..68491094f 100644--- a/apps/browser-extension/src/entrypoints/popup/hooks/useSharedFolders.ts+++ b/apps/browser-extension/src/entrypoints/popup/hooks/useSharedFolders.ts@@ -1,5 +1,5 @@-import { sharingView, type SharedFolder } from '@aliasvault/client/sharing/FamilySharingView';import { SharingService } from '@aliasvault/client/sharing/SharingService';+import { sharingView, type SharedFolder } from '@aliasvault/client/sharing/SharingView';import { CapabilityKeys } from '@aliasvault/models/webapi';import { useCallback, useEffect, useState } from 'react';@@ -10,7 +10,7 @@ import type { GroupMemberInfo, ReceivedManifestInvitation } from '@aliasvault/mo/*** What the vault shows of sharing: the shared folders with their people, the invitations waiting for an answer, the- * people verified before and this account's own code.+ * people verified before and this account's own fingerprint.*/export type SharedFolders = {isEnabled: boolean;@@ -19,7 +19,7 @@ export type SharedFolders = {invitations: ReceivedManifestInvitation[];invitationNames: Record<string, string>;verifiedPeople: GroupMemberInfo[];- ownCode: string | null;+ ownFingerprint: string | null;reload: () => Promise<void>;};@@ -32,7 +32,7 @@ export function useSharedFolders(): SharedFolders {const isEnabled = useCapabilities()(CapabilityKeys.VaultSharing);const [view, setView] = useState<ReturnType<typeof sharingView>>(sharingView(null));const [invitationNames, setInvitationNames] = useState<Record<string, string>>({});- const [ownCode, setOwnCode] = useState<string | null>(null);+ const [ownFingerprint, setOwnFingerprint] = useState<string | null>(null);const reload = useCallback(async (): Promise<void> => {if (!isEnabled) {@@ -42,7 +42,7 @@ export function useSharedFolders(): SharedFolders {const overview = await SharingService.getOverview(webApi);setView(sharingView(overview));setInvitationNames(await SharingService.openInvitationNames(overview.receivedInvitations));- setOwnCode(await SharingService.ownIdentityCode());+ setOwnFingerprint(await SharingService.ownAccountFingerprint());} catch {// Offline or not reachable: the vault keeps showing what it already knew.}@@ -53,5 +53,5 @@ export function useSharedFolders(): SharedFolders {return SharingService.watchPendingInvitationCount(() => void reload());}, [reload]);- return { isEnabled, ...view, invitationNames, ownCode, reload };+ return { isEnabled, ...view, invitationNames, ownFingerprint, reload };}diff --git a/apps/browser-extension/src/entrypoints/popup/pages/items/ItemsList.tsx b/apps/browser-extension/src/entrypoints/popup/pages/items/ItemsList.tsxindex 7d087b2a0..aa4a3805a 100644--- a/apps/browser-extension/src/entrypoints/popup/pages/items/ItemsList.tsx+++ b/apps/browser-extension/src/entrypoints/popup/pages/items/ItemsList.tsx@@ -2,9 +2,9 @@ import { isSameItem, scopedKey } from '@aliasvault/client/database/ItemRef';import { CredentialSortOrder } from '@aliasvault/client/database/repositories/SettingsRepository';import { canHaveSubfolders, getDescendantFolderIds, getFolderPath, getRecursiveItemCount, isItemInFolder, isSharedFolder } from '@aliasvault/client/items/FolderUtils';import { ItemFilter, applySearchFilter, applyTypeFilter, isItemTypeFilter, parseItemFilterType, type ItemFilterType } from '@aliasvault/client/items/ItemFilters';-import { canAdministerGroup, familySharingText, holdsManifestKey, MAX_SHARED_VAULT_NAME_LENGTH } from '@aliasvault/client/sharing/FamilySharingView';import { multiManifestRendering } from '@aliasvault/client/sharing/MultiManifestRendering';import { SharingService } from '@aliasvault/client/sharing/SharingService';+import { canAdministerGroup, sharingText, holdsManifestKey, MAX_SHARED_VAULT_NAME_LENGTH } from '@aliasvault/client/sharing/SharingView';import React, { useState, useEffect, useCallback, useDeferredValue, useMemo, useRef } from 'react';import { useTranslation } from 'react-i18next';import { useLocation, useNavigate, useParams, useSearchParams } from 'react-router-dom';@@ -488,11 +488,11 @@ const ItemsList: React.FC = () => {const name = currentFolderName ?? '';askPassword({- title: familySharingText.deleteVault,- confirmMessage: familySharingText.deleteVaultConfirm(name),+ title: sharingText.deleteVault,+ confirmMessage: sharingText.deleteVaultConfirm(name),confirmText: t('common.delete'),- description: familySharingText.deleteVaultPasswordPrompt(name),- failureMessage: familySharingText.errors.deleteVaultFailed,+ description: sharingText.deleteVaultPasswordPrompt(name),+ failureMessage: sharingText.errors.deleteVaultFailed,/*** Run the deletion with the password proof.* @param answerChallenge - answers the SRP challenge.@@ -918,8 +918,8 @@ const ItemsList: React.FC = () => {className="inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-sm border border-dashed border-primary-400 bg-primary-50/50 text-gray-500 hover:bg-primary-50 dark:border-primary-600 dark:bg-primary-900/10 dark:text-gray-400 dark:hover:bg-primary-900/20 transition-colors"><Icon name="mail" className="w-3.5 h-3.5 text-primary-500" />- <span className="truncate max-w-[120px]">{shared.invitationNames[invitation.id] ?? familySharingText.sharedVault}</span>- <span className="text-xs text-primary-600 dark:text-primary-400">{familySharingText.invitationPending}</span>+ <span className="truncate max-w-[120px]">{shared.invitationNames[invitation.id] ?? sharingText.sharedVault}</span>+ <span className="text-xs text-primary-600 dark:text-primary-400">{sharingText.invitationPending}</span></button>)) : [];@@ -965,7 +965,7 @@ const ItemsList: React.FC = () => {<buttonid="folder-people"onClick={() => setPeopleFolder({ folder: currentFolder, isShared: currentFolderIsVirtual })}- title={familySharingText.peopleTitle}+ title={sharingText.peopleTitle}className="p-1.5 text-gray-400 hover:text-primary-500 dark:text-gray-500 dark:hover:text-primary-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"><Icon name="users" className="w-4 h-4" />@@ -1317,7 +1317,7 @@ const ItemsList: React.FC = () => {<SharedFolderInvitationModalinvitation={openInvitation}- folderName={openInvitation ? shared.invitationNames[openInvitation.id] ?? familySharingText.sharedVault : ''}+ folderName={openInvitation ? shared.invitationNames[openInvitation.id] ?? sharingText.sharedVault : ''}onDone={accepted => (openInvitation ? finishInvitation(openInvitation.manifestId, accepted) : Promise.resolve())}onClose={() => setOpenInvitationId(null)}/>diff --git a/apps/browser-extension/src/entrypoints/popup/pages/settings/Settings.tsx b/apps/browser-extension/src/entrypoints/popup/pages/settings/Settings.tsxindex 20ba96961..ccd918ade 100644--- a/apps/browser-extension/src/entrypoints/popup/pages/settings/Settings.tsx+++ b/apps/browser-extension/src/entrypoints/popup/pages/settings/Settings.tsx@@ -1,6 +1,6 @@import { AppInfo } from '@aliasvault/client/platform/AppInfo';-import { familySharingText } from '@aliasvault/client/sharing/FamilySharingView';import { SharingService } from '@aliasvault/client/sharing/SharingService';+import { sharingText } from '@aliasvault/client/sharing/SharingView';import { CapabilityKeys } from '@aliasvault/models/webapi';import React, { useEffect, useCallback, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -12,7 +12,7 @@ import { HeaderIconType } from '@/entrypoints/popup/components/Icons/HeaderIconsimport Icon from '@/entrypoints/popup/components/Icons/Icon';import PageTitle from '@/entrypoints/popup/components/PageTitle';import { SettingsGroup, SettingsRow } from '@/entrypoints/popup/components/Settings/SettingsMenu';-import FamilyCodeDisplay from '@/entrypoints/popup/components/Sharing/FamilyCodeDisplay';+import AccountFingerprint from '@/entrypoints/popup/components/Sharing/AccountFingerprint';import { useApp } from '@/entrypoints/popup/context/AppContext';import { useAuth } from '@/entrypoints/popup/context/AuthContext';import { useCapabilities } from '@/entrypoints/popup/context/CapabilityContext';@@ -43,10 +43,10 @@ const Settings: React.FC = () => {const navigate = useNavigate();const [showLogoutConfirm, setShowLogoutConfirm] = useState(false);const [serverVersion, setServerVersion] = useState<string | null>(null);- const [ownSharingCode, setOwnSharingCode] = useState<string | null>(null);+ const [ownFingerprint, setOwnFingerprint] = useState<string | null>(null);useEffect(() => {- void SharingService.ownIdentityCode().then(setOwnSharingCode);+ void SharingService.ownAccountFingerprint().then(setOwnFingerprint);}, []);/**@@ -229,11 +229,11 @@ const Settings: React.FC = () => {</div></div></div>- {/* The code someone who shares a folder with this account needs to invite it. */}- {hasCapability(CapabilityKeys.VaultSharing) && ownSharingCode && (+ {/* The account fingerprint someone who shares a folder with this account needs to invite it. */}+ {hasCapability(CapabilityKeys.VaultSharing) && ownFingerprint && (<div className="flex flex-col gap-2 p-4">- <FamilyCodeDisplay id="own-identity-code" code={ownSharingCode} className="self-start" />- <p className="text-xs text-gray-500 dark:text-gray-400">{familySharingText.yourCodeSettingsHint}</p>+ <AccountFingerprint id="own-account-fingerprint" code={ownFingerprint} className="self-start" />+ <p className="text-xs text-gray-500 dark:text-gray-400">{sharingText.yourFingerprintSettingsHint}</p></div>)}</div>diff --git a/apps/browser-extension/src/entrypoints/popup/utils/SharingErrors.ts b/apps/browser-extension/src/entrypoints/popup/utils/SharingErrors.tsindex 2375f4894..08032fea2 100644--- a/apps/browser-extension/src/entrypoints/popup/utils/SharingErrors.ts+++ b/apps/browser-extension/src/entrypoints/popup/utils/SharingErrors.ts@@ -1,5 +1,5 @@import { apiErrorCodeOf } from '@aliasvault/client/api/errors/ApiRequestError';-import { sharingErrorMessage } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingErrorMessage } from '@aliasvault/client/sharing/SharingView';import type { SharingActionResponse } from '@/entrypoints/background/VaultMessageHandler';diff --git a/apps/browser-extension/src/utils/messaging/ExtensionMessaging.ts b/apps/browser-extension/src/utils/messaging/ExtensionMessaging.tsindex 770858a29..7b94982b4 100644--- a/apps/browser-extension/src/utils/messaging/ExtensionMessaging.ts+++ b/apps/browser-extension/src/utils/messaging/ExtensionMessaging.ts@@ -101,9 +101,9 @@ export interface IExtensionMessageProtocol {GROUP_CREATE_VAULT(data: { name: string }): SharingActionResponse;GROUP_UPDATE_VAULT(data: { groupId: string; manifestId: string; details: SharedManifestDetails }): SharingActionResponse;GROUP_INVITE_MEMBER(data: { groupId: string; manifestId: string; userId: string }): SharingActionResponse;- GROUP_LOOKUP_IDENTITY_CODE(data: { groupId?: string; identityCode: string }): SharingActionResponse;- GROUP_INVITE_MEMBER_BY_CODE(data: { groupId: string; manifestId: string; identityCode: string }): SharingActionResponse;- GROUP_ACCEPT_MANIFEST_INVITATION(data: { invitationId: string; identityCode?: string }): SharingActionResponse;+ GROUP_LOOKUP_ACCOUNT_FINGERPRINT(data: { groupId?: string; accountFingerprint: string }): SharingActionResponse;+ GROUP_INVITE_MEMBER_BY_FINGERPRINT(data: { groupId: string; manifestId: string; accountFingerprint: string }): SharingActionResponse;+ GROUP_ACCEPT_MANIFEST_INVITATION(data: { invitationId: string; accountFingerprint?: string }): SharingActionResponse;IS_URL_LINKED_TO_CREDENTIAL(data: { itemId: string; manifestId: string; url: string }): { linked: boolean };IS_LOGIN_SAVE_BLOCKED(data: { domain: string }): boolean;LOCK_VAULT(): BoolResponse;diff --git a/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/nativevaultmanager/NativeVaultManager.kt b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/nativevaultmanager/NativeVaultManager.ktindex cbabdf4e9..e9ac7c817 100644--- a/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/nativevaultmanager/NativeVaultManager.kt+++ b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/nativevaultmanager/NativeVaultManager.kt@@ -351,7 +351,7 @@ class NativeVaultManager(reactContext: ReactApplicationContext) :}/**- * The identity code of the account's own signing key; null while locked or when the account has no signing key yet.+ * The account fingerprint of the account's own signing key; null while locked or when the account has no signing key yet.* @param promise The promise to resolve*/@ReactMethoddiff --git a/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultData.kt b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultData.ktindex 78a944416..090173e3e 100644--- a/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultData.kt+++ b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultData.kt@@ -71,7 +71,7 @@ data class VaultMigrationResult(* @property error The error code, if any.* @property errorMessage The error message, if any.* @property manifestId The shared manifest the operation created, invited to or accepted.- * @property username The account an identity code belonged to.+ * @property username The account an account fingerprint belonged to.* @property alreadyMember The account is already in the folder's group, so only its key was certified.*/data class VaultSharingResult(diff --git a/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultStore.kt b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultStore.ktindex a943479f6..ac6e36635 100644--- a/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultStore.kt+++ b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultStore.kt@@ -263,9 +263,9 @@ class VaultStore(get() = crypto.accountKeyBase64/**- * The identity code of the account's own signing key, derived from the private key the sync engine cached, or null+ * The account fingerprint of the account's own signing key, derived from the private key the sync engine cached, or null* while the vault is locked or the account has no signing key yet.- * Other platform implementations: SharingService.ownIdentityCode (core/client), VaultStore.signingKeyFingerprint (iOS).+ * Other platform implementations: SharingService.ownAccountFingerprint (core/client), VaultStore.signingKeyFingerprint (iOS).*/fun signingKeyFingerprint(): String? {val accountKey = accountKeyBase64?.let { Base64.decode(it, Base64.NO_WRAP) } ?: return nulldiff --git a/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultSync.kt b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultSync.ktindex 164d07d6c..c292aca56 100644--- a/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultSync.kt+++ b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultSync.kt@@ -35,7 +35,7 @@ class VaultSync("createSharedManifest","inviteToSharedManifest","updateSharedManifest",- "lookupIdentityCode",+ "lookupAccountFingerprint","acceptSharedManifestInvitation",)}diff --git a/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultSyncEngine.kt b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultSyncEngine.ktindex a2efec381..ee6c9b019 100644--- a/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultSyncEngine.kt+++ b/apps/mobile-app/android/app/src/main/java/net/aliasvault/app/vaultstore/VaultSyncEngine.kt@@ -33,7 +33,7 @@ class VaultSyncEngine(private const val ENCRYPTED_VEK_STATE_KEY = "encryptedVek"private const val ENCRYPTED_ACCOUNT_PRIVATE_KEY_STATE_KEY = "encryptedAccountPrivateKey"- /** Engine state key holding the account signing private key encrypted with the Account Key, which the own identity code derives from. */+ /** Engine state key holding the account signing private key encrypted with the Account Key, which the own account fingerprint derives from. */internal const val ENCRYPTED_SIGNING_PRIVATE_KEY_STATE_KEY = "encryptedSigningPrivateKey"/**diff --git a/apps/mobile-app/app/(tabs)/items/folder/[manifestId]/[id].tsx b/apps/mobile-app/app/(tabs)/items/folder/[manifestId]/[id].tsxindex d25ea02d0..93ba99df2 100644--- a/apps/mobile-app/app/(tabs)/items/folder/[manifestId]/[id].tsx+++ b/apps/mobile-app/app/(tabs)/items/folder/[manifestId]/[id].tsx@@ -1,9 +1,9 @@import { scopedKey, type ItemRef } from '@aliasvault/client/database/ItemRef';import { canHaveSubfolders, getRecursiveItemCount, isSharedFolder } from '@aliasvault/client/items/FolderUtils';import { ItemFilter, applySearchFilter, applyTypeFilter, isItemTypeFilter, parseItemFilterType, type ItemFilterType } from '@aliasvault/client/items/ItemFilters';-import { canAdministerGroup, familySharingText, holdsManifestKey, MAX_SHARED_VAULT_NAME_LENGTH } from '@aliasvault/client/sharing/FamilySharingView';import { multiManifestRendering } from '@aliasvault/client/sharing/MultiManifestRendering';import { SharingService } from '@aliasvault/client/sharing/SharingService';+import { canAdministerGroup, sharingText, holdsManifestKey, MAX_SHARED_VAULT_NAME_LENGTH } from '@aliasvault/client/sharing/SharingView';import MaterialIcons from '@expo/vector-icons/MaterialIcons';import { useNavigation, useRouter, useLocalSearchParams } from 'expo-router';import { useState, useEffect, useCallback, useRef, useMemo } from 'react';@@ -267,9 +267,9 @@ export default function FolderViewScreen(): React.ReactNode {return;}const name = folder?.Name ?? '';- showConfirm(familySharingText.deleteVault, familySharingText.deleteVaultConfirm(name), t('common.delete'), async () => {+ showConfirm(sharingText.deleteVault, sharingText.deleteVaultConfirm(name), t('common.delete'), async () => {try {- const done = await runWithPassword(familySharingText.deleteVault, familySharingText.deleteVaultPasswordPrompt(name), t('common.delete'), answerChallenge => (+ const done = await runWithPassword(sharingText.deleteVault, sharingText.deleteVaultPasswordPrompt(name), t('common.delete'), answerChallenge => (SharingService.deleteSharedManifest(webApi, currentShared.group.groupId, currentShared.manifest.manifestId, answerChallenge)));if (!done) {@@ -278,10 +278,10 @@ export default function FolderViewScreen(): React.ReactNode {await syncVault();emitter.emit('itemChanged');await reloadShared();- Toast.show({ type: 'success', text1: familySharingText.vaultDeleted });+ Toast.show({ type: 'success', text1: sharingText.vaultDeleted });router.dismissTo('/(tabs)/items');} catch (deleteError) {- Toast.show({ type: 'error', text1: sharingFailureMessage(deleteError, familySharingText.errors.deleteVaultFailed) });+ Toast.show({ type: 'error', text1: sharingFailureMessage(deleteError, sharingText.errors.deleteVaultFailed) });}}, { confirmStyle: 'destructive' });}, [currentShared, folder?.Name, showConfirm, runWithPassword, webApi, syncVault, reloadShared, router, t]);diff --git a/apps/mobile-app/app/(tabs)/items/index.tsx b/apps/mobile-app/app/(tabs)/items/index.tsxindex b8b3cfc3c..14d01f48d 100644--- a/apps/mobile-app/app/(tabs)/items/index.tsx+++ b/apps/mobile-app/app/(tabs)/items/index.tsx@@ -2,7 +2,7 @@ import { scopedKey, type ItemRef } from '@aliasvault/client/database/ItemRef';import { CredentialSortOrder } from '@aliasvault/client/database/repositories/SettingsRepository';import { getRecursiveItemCount, isSharedFolder } from '@aliasvault/client/items/FolderUtils';import { ItemFilter, applySearchFilter, applyTypeFilter, isItemTypeFilter, type ItemFilterType } from '@aliasvault/client/items/ItemFilters';-import { familySharingText } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText } from '@aliasvault/client/sharing/SharingView';import MaterialIcons from '@expo/vector-icons/MaterialIcons';import { useNavigation, useRouter, useLocalSearchParams } from 'expo-router';import { useState, useEffect, useCallback, useRef, useMemo } from 'react';@@ -754,8 +754,8 @@ export default function ItemsScreen(): React.ReactNode {{shared.invitations.map(invitation => (<TouchableOpacity key={invitation.id} style={styles.invitationPill} onPress={() => setOpenInvitationId(invitation.id)} activeOpacity={0.7}><MaterialIcons name="mail-outline" size={16} color={colors.primary} />- <Text style={styles.invitationPillName} numberOfLines={1} ellipsizeMode="tail">{shared.invitationNames[invitation.id] ?? familySharingText.sharedVault}</Text>- <Text style={styles.invitationPillLabel}>{familySharingText.invitationPending}</Text>+ <Text style={styles.invitationPillName} numberOfLines={1} ellipsizeMode="tail">{shared.invitationNames[invitation.id] ?? sharingText.sharedVault}</Text>+ <Text style={styles.invitationPillLabel}>{sharingText.invitationPending}</Text></TouchableOpacity>))}<TouchableOpacity@@ -967,7 +967,7 @@ export default function ItemsScreen(): React.ReactNode {return (<SharedFolderInvitationModalinvitation={invitation}- folderName={invitation ? shared.invitationNames[invitation.id] ?? familySharingText.sharedVault : ''}+ folderName={invitation ? shared.invitationNames[invitation.id] ?? sharingText.sharedVault : ''}onDone={accepted => (invitation ? finishInvitation(invitation.manifestId, accepted) : Promise.resolve())}onClose={() => setOpenInvitationId(null)}/>diff --git a/apps/mobile-app/app/(tabs)/settings/index.tsx b/apps/mobile-app/app/(tabs)/settings/index.tsxindex d8ca0c0b0..18dad42ea 100644--- a/apps/mobile-app/app/(tabs)/settings/index.tsx+++ b/apps/mobile-app/app/(tabs)/settings/index.tsx@@ -1,5 +1,5 @@import { AppInfo } from '@aliasvault/client/platform/AppInfo';-import { familySharingText } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText } from '@aliasvault/client/sharing/SharingView';import { CapabilityKeys } from '@aliasvault/models/webapi';import { Ionicons } from '@expo/vector-icons';import { router, useFocusEffect, useNavigation } from 'expo-router';@@ -16,7 +16,7 @@ import { useMinDurationLoading } from '@/hooks/useMinDurationLoading';import { useNavigationDebounce } from '@/hooks/useNavigationDebounce';import { useTranslation } from '@/hooks/useTranslation';-import { FamilyCode } from '@/components/sharing/FamilyCode';+import { AccountFingerprint } from '@/components/sharing/AccountFingerprint';import { ThemedContainer } from '@/components/themed/ThemedContainer';import { ThemedText } from '@/components/themed/ThemedText';import { AndroidHeader } from '@/components/ui/AndroidHeader';@@ -50,15 +50,15 @@ export default function SettingsScreen() : React.ReactNode {const [clipboardClearDisplay, setClipboardClearDisplay] = useState<string>('');const [authMethodDisplay, setAuthMethodDisplay] = useState<string>('');const [serverVersion, setServerVersion] = useState<string | null>(null);- const [ownSharingCode, setOwnSharingCode] = useState<string | null>(null);+ const [ownFingerprint, setOwnFingerprint] = useState<string | null>(null);const isSharingEnabled = hasCapability(CapabilityKeys.VaultSharing);- // The own code is derived natively from the signing private key, which only the native layer can open.+ // The own fingerprint is derived natively from the signing private key, which only the native layer can open.useFocusEffect(useCallback(() => {if (!isSharingEnabled) {return;}- NativeVaultManager.getSigningKeyFingerprint().then(setOwnSharingCode).catch(() => setOwnSharingCode(null));+ NativeVaultManager.getSigningKeyFingerprint().then(setOwnFingerprint).catch(() => setOwnFingerprint(null));}, [isSharingEnabled]));const [isFirstLoad, setIsFirstLoad] = useMinDurationLoading(true, 100);const { isEnabled: isDeveloperToolsEnabled, registerTap, refresh: refreshDeveloperTools } = useDeveloperToolsUnlock();@@ -419,11 +419,11 @@ export default function SettingsScreen() : React.ReactNode {</TouchableOpacity></View>- {/* The code people need to invite this account to a shared folder. */}- {isSharingEnabled && ownSharingCode && (+ {/* The account fingerprint people need to invite this account to a shared folder. */}+ {isSharingEnabled && ownFingerprint && (<View style={[styles.groupSection, styles.ownCodeSection]}>- <FamilyCode code={ownSharingCode} />- <ThemedText style={styles.ownCodeHint}>{familySharingText.yourCodeSettingsHint}</ThemedText>+ <AccountFingerprint code={ownFingerprint} />+ <ThemedText style={styles.ownCodeHint}>{sharingText.yourFingerprintSettingsHint}</ThemedText></View>)}diff --git a/apps/mobile-app/components/folders/FolderHeaderTitle.tsx b/apps/mobile-app/components/folders/FolderHeaderTitle.tsxindex bb8110ccb..d8b135721 100644--- a/apps/mobile-app/components/folders/FolderHeaderTitle.tsx+++ b/apps/mobile-app/components/folders/FolderHeaderTitle.tsx@@ -1,4 +1,4 @@-import { familySharingText } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText } from '@aliasvault/client/sharing/SharingView';import React from 'react';import { Platform, StyleSheet, Text, View, useWindowDimensions } from 'react-native';@@ -35,7 +35,7 @@ export const FolderHeaderTitle: React.FC<FolderHeaderTitleProps> = ({ name, isSh});return (- <View style={styles.container} accessible accessibilityRole="header" accessibilityLabel={isShared ? `${name}, ${familySharingText.sharedVault}` : name}>+ <View style={styles.container} accessible accessibilityRole="header" accessibilityLabel={isShared ? `${name}, ${sharingText.sharedVault}` : name}><FolderIcon isShared={isShared} size={20} color={colors.tint} /><Text style={styles.title} numberOfLines={1} ellipsizeMode="tail">{name}</Text></View>diff --git a/apps/mobile-app/components/items/details/EmailPreview.tsx b/apps/mobile-app/components/items/details/EmailPreview.tsxindex 818012bb2..27702ed19 100644--- a/apps/mobile-app/components/items/details/EmailPreview.tsx+++ b/apps/mobile-app/components/items/details/EmailPreview.tsx@@ -7,7 +7,7 @@ import { View, StyleSheet, TouchableOpacity, Linking, AppState } from 'react-natimport { apiErrorCodeOf } from '@aliasvault/client/api/errors/ApiRequestError';import { type AliasOwnerNotice, aliasOwnerErrorText, aliasOwnerNotice, moveAliasHere } from '@aliasvault/client/email/AliasOwner';import { SpamOkClient } from '@aliasvault/client/email/SpamOkClient';-import { familySharingText } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText } from '@aliasvault/client/sharing/SharingView';import { AppInfo } from '@aliasvault/client/platform/AppInfo';import { logExpected } from '@aliasvault/client/utilities/Diagnostics';import { mailboxPollDelayMs } from '@aliasvault/client/utilities/PollBackoff';@@ -385,7 +385,7 @@ export const EmailPreview: React.FC<EmailPreviewProps> = ({ email, manifestId })* Move the alias to this item's vault after confirmation, then reload.*/const confirmMoveHere = (moveConfirm: string): void => {- showConfirm(familySharingText.aliasOwner.moveHere, moveConfirm, t('common.confirm'), async () => {+ showConfirm(sharingText.aliasOwner.moveHere, moveConfirm, t('common.confirm'), async () => {try {await moveAliasHere(webApi, email, manifestId);setOwnerNotice(null);@@ -401,7 +401,7 @@ export const EmailPreview: React.FC<EmailPreviewProps> = ({ email, manifestId })<ThemedText style={styles.ownerNoticeText}>{ownerNotice.notice}</ThemedText>{ownerNotice.canMove && (<TouchableOpacity style={styles.moveButton} onPress={() => confirmMoveHere(ownerNotice.moveConfirm)} testID="move-alias-here">- <ThemedText style={styles.moveButtonText}>{familySharingText.aliasOwner.moveHere}</ThemedText>+ <ThemedText style={styles.moveButtonText}>{sharingText.aliasOwner.moveHere}</ThemedText></TouchableOpacity>)}</View>diff --git a/apps/mobile-app/components/sharing/FamilyCode.tsx b/apps/mobile-app/components/sharing/AccountFingerprint.tsxsimilarity index 82%rename from apps/mobile-app/components/sharing/FamilyCode.tsxrename to apps/mobile-app/components/sharing/AccountFingerprint.tsxindex e1f3b0fa1..52ad50f46 100644--- a/apps/mobile-app/components/sharing/FamilyCode.tsx+++ b/apps/mobile-app/components/sharing/AccountFingerprint.tsx@@ -1,4 +1,4 @@-import { familySharingText } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText } from '@aliasvault/client/sharing/SharingView';import { Ionicons } from '@expo/vector-icons';import React, { useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -12,17 +12,17 @@ import { ThemedText } from '@/components/themed/ThemedText';const COPIED_FEEDBACK_MS = 2000;-interface IFamilyCodeProps {- /** The account's own code. */+interface IAccountFingerprintProps {+ /** The account's own fingerprint. */code: string;- /** A smaller pill without the copy and share buttons, for showing the code inside other content. */+ /** A smaller pill without the copy and share buttons, for showing the fingerprint inside other content. */isSmall?: boolean;}/**- * The account's own code, with buttons to copy and share it; tapping the code itself copies it too. The code is not secret, so it is never cleared from the clipboard.+ * The account's own fingerprint, with buttons to copy and share it; tapping the fingerprint itself copies it too. The fingerprint is not secret, so it is never cleared from the clipboard.*/-export const FamilyCode: React.FC<IFamilyCodeProps> = ({ code, isSmall = false }) => {+export const AccountFingerprint: React.FC<IAccountFingerprintProps> = ({ code, isSmall = false }) => {const { t } = useTranslation();const colors = useColors();const [copied, setCopied] = useState(false);@@ -36,25 +36,25 @@ export const FamilyCode: React.FC<IFamilyCodeProps> = ({ code, isSmall = false }}, [copied]);/**- * Copy the code to the clipboard.+ * Copy the fingerprint to the clipboard.*/const copy = async (): Promise<void> => {try {await copyToClipboard(code);setCopied(true);} catch (error) {- console.error('Failed to copy the code:', error);+ console.error('Failed to copy the fingerprint:', error);}};/**- * Open the share sheet with the code.+ * Open the share sheet with the fingerprint.*/const share = async (): Promise<void> => {try {await Share.share({ message: code });} catch (error) {- console.error('Failed to share the code:', error);+ console.error('Failed to share the fingerprint:', error);}};@@ -121,7 +121,7 @@ export const FamilyCode: React.FC<IFamilyCodeProps> = ({ code, isSmall = false }<View><TouchableOpacity style={[styles.pill, isSmall && styles.smallPill]} onPress={() => void copy()} activeOpacity={0.7} accessibilityRole="button" accessibilityHint={t('common.copyToClipboard')}><Ionicons name="shield-checkmark-outline" size={isSmall ? 15 : 18} color={colors.primary} />- <ThemedText style={[styles.pillLabel, isSmall && styles.smallLabel]}>{familySharingText.yourCode}</ThemedText>+ <ThemedText style={[styles.pillLabel, isSmall && styles.smallLabel]}>{sharingText.yourFingerprint}</ThemedText><ThemedText style={[styles.pillCode, isSmall && styles.smallCode]}>{code}</ThemedText>{isSmall && <Ionicons name={copied ? 'checkmark' : 'copy-outline'} size={14} color={colors.primary} />}</TouchableOpacity>@@ -141,4 +141,4 @@ export const FamilyCode: React.FC<IFamilyCodeProps> = ({ code, isSmall = false });};-export default FamilyCode;+export default AccountFingerprint;diff --git a/apps/mobile-app/components/sharing/InviteMemberWizard.tsx b/apps/mobile-app/components/sharing/InviteMemberWizard.tsxindex 806ae4c7b..25946abfe 100644--- a/apps/mobile-app/components/sharing/InviteMemberWizard.tsx+++ b/apps/mobile-app/components/sharing/InviteMemberWizard.tsx@@ -1,4 +1,4 @@-import { familySharingText, splitAround } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText, splitAround } from '@aliasvault/client/sharing/SharingView';import { Ionicons } from '@expo/vector-icons';import React, { useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -7,12 +7,12 @@ import { ActivityIndicator, StyleSheet, Text, TextInput, TouchableOpacity, Viewimport { useColors } from '@/hooks/useColorScheme';import { ModalWrapper } from '@/components/common/ModalWrapper';-import { FamilyCode } from '@/components/sharing/FamilyCode';+import { AccountFingerprint } from '@/components/sharing/AccountFingerprint';-/** The account a code belongs to. */-export type FamilyCodeAccount = { username: string };+/** The account an account fingerprint belongs to. */+export type AccountLookupResult = { username: string };-/** Somebody verified before, who can be invited without their code. */+/** Somebody verified before, who can be invited without their account fingerprint. */export type KnownPerson = {userId: string;username: string;@@ -22,17 +22,17 @@ export type KnownPerson = {interface IInviteMemberWizardProps {isOpen: boolean;- /** The account's own code, which the invitee needs to accept. */- ownCode: string | null;+ /** The account's own fingerprint, which the invitee needs to accept. */+ ownFingerprint: string | null;/** The folder the invitation is for. */folderName: string;/** Whether inviting turns a personal folder into a shared one. */sharesFolder?: boolean;- /** Find the account behind a code; throws an error with the message to show. */- onLookup: (code: string) => Promise<FamilyCodeAccount>;- /** Invite the account behind a code; throws an error with the message to show. */+ /** Find the account behind an account fingerprint; throws an error with the message to show. */+ onLookup: (code: string) => Promise<AccountLookupResult>;+ /** Invite the account behind an account fingerprint; throws an error with the message to show. */onInvite: (code: string) => Promise<void>;- /** The people verified before who are not in the folder yet, offered before the code field. */+ /** The people verified before who are not in the folder yet, offered before the fingerprint field. */people?: KnownPerson[];/** Invite somebody verified before; throws an error with the message to show. */onInvitePerson?: (userId: string) => Promise<void>;@@ -43,16 +43,16 @@ const STEP_COUNT = 3;const CLOSE_DELAY_SECONDS = 3;/**- * Three step wizard that picks somebody verified before or takes a new person's code, confirms who gets invited, and hands- * out this account's own code for them to accept with.+ * Three step wizard that picks somebody verified before or takes a new person's account fingerprint, confirms who gets invited, and hands+ * out this account's own fingerprint for them to accept with.*/-export const InviteMemberWizard: React.FC<IInviteMemberWizardProps> = ({ isOpen, ownCode, folderName, sharesFolder = false, onLookup, onInvite, people = [], onInvitePerson, onClose }) => {+export const InviteMemberWizard: React.FC<IInviteMemberWizardProps> = ({ isOpen, ownFingerprint, folderName, sharesFolder = false, onLookup, onInvite, people = [], onInvitePerson, onClose }) => {const { t } = useTranslation();const colors = useColors();const [step, setStep] = useState(1);const [code, setCode] = useState('');- const [account, setAccount] = useState<FamilyCodeAccount | null>(null);- /** The person verified before who was picked instead of entering a code. */+ const [account, setAccount] = useState<AccountLookupResult | null>(null);+ /** The person verified before who was picked instead of entering a fingerprint. */const [selected, setSelected] = useState<KnownPerson | null>(null);const [error, setError] = useState<string | null>(null);const [isBusy, setIsBusy] = useState(false);@@ -81,9 +81,9 @@ export const InviteMemberWizard: React.FC<IInviteMemberWizardProps> = ({ isOpen,const trimmedCode = code.trim();const username = account?.username ?? '';- const [invitedBefore, invitedName, invitedAfter] = splitAround(familySharingText.inviteWizardInvited(username), username);- const [shareBefore, shareName, shareAfter] = splitAround(familySharingText.inviteWizardShareHint(username), username);- const [confirmBefore, confirmName, confirmAfter] = splitAround(sharesFolder ? familySharingText.inviteWizardConfirmShare(username, folderName) : familySharingText.inviteWizardConfirmFolder(username, folderName), username);+ const [invitedBefore, invitedName, invitedAfter] = splitAround(sharingText.inviteWizardInvited(username), username);+ const [shareBefore, shareName, shareAfter] = splitAround(sharingText.inviteWizardShareHint(username), username);+ const [confirmBefore, confirmName, confirmAfter] = splitAround(sharesFolder ? sharingText.inviteWizardConfirmShare(username, folderName) : sharingText.inviteWizardConfirmFolder(username, folderName), username);const canContinue = selected !== null || trimmedCode.length > 0;/**@@ -103,7 +103,7 @@ export const InviteMemberWizard: React.FC<IInviteMemberWizardProps> = ({ isOpen,};/**- * Ask to confirm the person picked, or look the code up first and ask to confirm who it belongs to.+ * Ask to confirm the person picked, or look the fingerprint up first and ask to confirm who it belongs to.*/const lookup = (): Promise<void> => runStep(async () => {setAccount(selected ? { username: selected.username } : await onLookup(trimmedCode));@@ -111,7 +111,7 @@ export const InviteMemberWizard: React.FC<IInviteMemberWizardProps> = ({ isOpen,});/**- * Invite the person picked or the account behind the code, then show this account's own code.+ * Invite the person picked or the account behind the account fingerprint, then show this account's own fingerprint.*/const invite = (): Promise<void> => runStep(async () => {if (selected && onInvitePerson) {@@ -290,29 +290,29 @@ export const InviteMemberWizard: React.FC<IInviteMemberWizardProps> = ({ isOpen,);return (- <ModalWrapper isOpen={isOpen} onClose={close} isSubmitting={isBusy || !canClose} title={familySharingText.invitePeople} keyboardAvoiding showHeaderBorder={false} showFooterBorder={false}>+ <ModalWrapper isOpen={isOpen} onClose={close} isSubmitting={isBusy || !canClose} title={sharingText.invitePeople} keyboardAvoiding showHeaderBorder={false} showFooterBorder={false}>{/* Progress through the three steps. */}<View style={styles.progressRow} accessibilityElementsHidden importantForAccessibility="no-hide-descendants">{Array.from({ length: STEP_COUNT }, (_, index) => (<View key={index} style={[styles.progressBar, { backgroundColor: index < step ? colors.primary : colors.accentBorder }]} />))}</View>- <Text style={styles.progressText}>{familySharingText.wizardStep(step, STEP_COUNT)}</Text>+ <Text style={styles.progressText}>{sharingText.wizardStep(step, STEP_COUNT)}</Text>- {/* While a step works (looking the code up, or sharing the folder and sending the invitation) its content makes way for a spinner. */}+ {/* While a step works (looking the fingerprint up, or sharing the folder and sending the invitation) its content makes way for a spinner. */}{isBusy && (<View style={styles.busyBox}><ActivityIndicator color={colors.primary} />- <Text style={styles.busyText}>{step === 2 && sharesFolder ? familySharingText.wizardCreating : t('common.loading')}</Text>+ <Text style={styles.busyText}>{step === 2 && sharesFolder ? sharingText.wizardCreating : t('common.loading')}</Text></View>)}{step === 1 && !isBusy && (<View>- {/* Somebody verified before needs no code; picking them and entering a code exclude each other. */}+ {/* Somebody verified before needs no fingerprint; picking them and entering one exclude each other. */}{people.length > 0 && (<View>- <Text style={styles.stepTitle}>{familySharingText.inviteWizardChooseTitle}</Text>+ <Text style={styles.stepTitle}>{sharingText.inviteWizardChooseTitle}</Text>{people.map(person => {const isSelected = selected?.userId === person.userId;return (@@ -339,8 +339,8 @@ export const InviteMemberWizard: React.FC<IInviteMemberWizardProps> = ({ isOpen,)}<View style={people.length > 0 ? styles.codeSection : undefined}>- <Text style={styles.stepTitle}>{people.length > 0 ? familySharingText.inviteWizardNewCodeTitle : familySharingText.inviteWizardCodeTitle}</Text>- <Text style={styles.hintText}>{familySharingText.inviteWizardCodeHint}</Text>+ <Text style={styles.stepTitle}>{people.length > 0 ? sharingText.inviteWizardNewFingerprintTitle : sharingText.inviteWizardFingerprintTitle}</Text>+ <Text style={styles.hintText}>{sharingText.inviteWizardFingerprintHint}</Text><TextInputstyle={styles.input}value={code}@@ -348,7 +348,7 @@ export const InviteMemberWizard: React.FC<IInviteMemberWizardProps> = ({ isOpen,setCode(value);setSelected(null);}}- placeholder={familySharingText.codePlaceholder}+ placeholder={sharingText.fingerprintPlaceholder}placeholderTextColor={colors.textMuted}keyboardType="number-pad"autoCorrect={false}@@ -367,12 +367,12 @@ export const InviteMemberWizard: React.FC<IInviteMemberWizardProps> = ({ isOpen,{step === 2 && !isBusy && (<View>- <Text style={styles.stepTitle}>{familySharingText.inviteWizardConfirmTitle}</Text>+ <Text style={styles.stepTitle}>{sharingText.inviteWizardConfirmTitle}</Text><Text style={styles.bodyText}>{confirmBefore}<Text style={styles.emphasis}>{confirmName}</Text>{confirmAfter}</Text>{error && <Text style={styles.errorText}>{error}</Text>}<View style={styles.buttonRow}>{renderButton(t('common.back'), () => setStep(1), false)}- {renderButton(familySharingText.invite, () => void invite(), true)}+ {renderButton(sharingText.invite, () => void invite(), true)}</View></View>)}@@ -383,15 +383,15 @@ export const InviteMemberWizard: React.FC<IInviteMemberWizardProps> = ({ isOpen,<Ionicons name="checkmark-circle" size={22} color={colors.success} /><Text style={styles.stepTitle}>{invitedBefore}<Text style={styles.emphasis}>{invitedName}</Text>{invitedAfter}</Text></View>- {/* What the inviter still has to do: the invitee types this code to accept. */}+ {/* What the inviter still has to do: the invitee types this fingerprint to accept. */}<View style={styles.nextStepBox}>- <Text style={styles.nextStepTitle}>{familySharingText.inviteWizardNextStep}</Text>+ <Text style={styles.nextStepTitle}>{sharingText.inviteWizardNextStep}</Text><Text style={styles.bodyText}>{shareBefore}<Text style={styles.emphasis}>{shareName}</Text>{shareAfter}</Text>- {ownCode && <View style={styles.shareBlock}><FamilyCode code={ownCode} /></View>}- <Text style={styles.hintText}>{familySharingText.inviteWizardShareNotSecret}</Text>+ {ownFingerprint && <View style={styles.shareBlock}><AccountFingerprint code={ownFingerprint} /></View>}+ <Text style={styles.hintText}>{sharingText.inviteWizardShareNotSecret}</Text></View><View style={styles.buttonRow}>- {renderButton(canClose ? t('common.close') : familySharingText.closeCountdown(closeCountdown), close, false, canClose)}+ {renderButton(canClose ? t('common.close') : sharingText.closeCountdown(closeCountdown), close, false, canClose)}</View></View>)}diff --git a/apps/mobile-app/components/sharing/SharedFolderAccessModal.tsx b/apps/mobile-app/components/sharing/SharedFolderAccessModal.tsxindex e7238abcb..ad1ae0a9f 100644--- a/apps/mobile-app/components/sharing/SharedFolderAccessModal.tsx+++ b/apps/mobile-app/components/sharing/SharedFolderAccessModal.tsx@@ -1,4 +1,4 @@-import { canAdministerGroup, describeMemberAccess, familySharingText, hasOtherPeople, holdsManifestKey, invitablePeople, memberKeyProblem, pendingInvitees, roleLabel, sharingView, type SharedFolder } from '@aliasvault/client/sharing/FamilySharingView';+import { canAdministerGroup, describeMemberAccess, sharingText, hasOtherPeople, holdsManifestKey, invitablePeople, memberKeyProblem, pendingInvitees, roleLabel, sharingView, type SharedFolder } from '@aliasvault/client/sharing/SharingView';import { SharingService } from '@aliasvault/client/sharing/SharingService';import { Ionicons } from '@expo/vector-icons';import React, { useEffect, useRef, useState } from 'react';@@ -14,8 +14,8 @@ import { type SharedFolders } from '@/hooks/useSharedFolders';import { useVaultSync } from '@/hooks/useVaultSync';import { ModalWrapper } from '@/components/common/ModalWrapper';-import { FamilyCode } from '@/components/sharing/FamilyCode';-import { InviteMemberWizard, type FamilyCodeAccount } from '@/components/sharing/InviteMemberWizard';+import { AccountFingerprint } from '@/components/sharing/AccountFingerprint';+import { InviteMemberWizard, type AccountLookupResult } from '@/components/sharing/InviteMemberWizard';import { ThemedText } from '@/components/themed/ThemedText';import { useDb } from '@/context/DbContext';import { useDialog } from '@/context/DialogContext';@@ -34,7 +34,7 @@ interface ISharedFolderAccessModalProps {}/**- * The people of a folder: who has access, inviting someone new by their code or somebody verified before, and taking+ * The people of a folder: who has access, inviting someone new by their account fingerprint or somebody verified before, and taking* access away. A personal folder becomes a shared folder on its first invitation, and turns personal again once nobody* else is in it. Mounted while the sheet is open.*/@@ -98,10 +98,10 @@ export const SharedFolderAccessModal: React.FC<ISharedFolderAccessModalProps> =const client = dbContext.sqliteClient;if (isShared || !client) {// A shared folder whose people have not loaded yet; never share it a second time.- throw new SharingOperationError(isShared ? familySharingText.errors.inviteFailed : familySharingText.errors.createVaultFailed);+ throw new SharingOperationError(isShared ? sharingText.errors.inviteFailed : sharingText.errors.createVaultFailed);}- const result = await runSharingOperation('createSharedManifest', { name: folder.Name }, familySharingText.errors.createVaultFailed);+ const result = await runSharingOperation('createSharedManifest', { name: folder.Name }, sharingText.errors.createVaultFailed);const manifestId = (result.manifestId ?? '').toLowerCase();// The sync pushes the new shared folder; the contents then move into it with a push of their own.@@ -114,7 +114,7 @@ export const SharedFolderAccessModal: React.FC<ISharedFolderAccessModalProps> =const created = sharingView(await SharingService.getOverview(webApi)).folders.find(candidate => candidate.manifest.manifestId.toLowerCase() === manifestId) ?? null;if (!created) {- throw new SharingOperationError(familySharingText.errors.createVaultFailed);+ throw new SharingOperationError(sharingText.errors.createVaultFailed);}onMoved({ Id: manifestId, ManifestId: manifestId }, true);return created;@@ -127,42 +127,42 @@ export const SharedFolderAccessModal: React.FC<ISharedFolderAccessModalProps> =const inviteKnown = async (userId: string): Promise<void> => {try {const target = await ensureShared();- await runSharingOperation('inviteToSharedManifest', { groupId: target.group.groupId, manifestId: target.manifest.manifestId, userId }, familySharingText.errors.inviteFailed);- setInviteNotice(familySharingText.invitationSent(shared.verifiedPeople.find(person => person.userId === userId)?.username ?? ''));+ await runSharingOperation('inviteToSharedManifest', { groupId: target.group.groupId, manifestId: target.manifest.manifestId, userId }, sharingText.errors.inviteFailed);+ setInviteNotice(sharingText.invitationSent(shared.verifiedPeople.find(person => person.userId === userId)?.username ?? ''));} catch (inviteError) {- throw new Error(sharingFailureMessage(inviteError, familySharingText.errors.inviteFailed));+ throw new Error(sharingFailureMessage(inviteError, sharingText.errors.inviteFailed));} finally {await shared.reload();}};/**- * Find the account behind a code for the invite wizard, also before the folder is shared. Throws an error with the message to show.- * @param code - the code entered.+ * Find the account behind an account fingerprint for the invite wizard, also before the folder is shared. Throws an error with the message to show.+ * @param code - the account fingerprint entered.*/- const lookup = async (code: string): Promise<FamilyCodeAccount> => {+ const lookup = async (code: string): Promise<AccountLookupResult> => {try {- const result = await runSharingOperation('lookupIdentityCode', { groupId: current?.group.groupId, identityCode: code }, familySharingText.errors.inviteFailed);+ const result = await runSharingOperation('lookupAccountFingerprint', { groupId: current?.group.groupId, accountFingerprint: code }, sharingText.errors.inviteFailed);if (result.alreadyMember) {- throw new SharingOperationError(familySharingText.errors.alreadyHasAccess);+ throw new SharingOperationError(sharingText.errors.alreadyHasAccess);}return { username: result.username ?? '' };} catch (lookupError) {- throw new Error(sharingFailureMessage(lookupError, familySharingText.errors.inviteFailed));+ throw new Error(sharingFailureMessage(lookupError, sharingText.errors.inviteFailed));}};/**- * Invite the account behind a code, sharing a personal folder at this point; the sync engine checks its key against the code and certifies it.- * @param code - the code entered.+ * Invite the account behind an account fingerprint, sharing a personal folder at this point; the sync engine checks its key against the fingerprint and certifies it.+ * @param code - the account fingerprint entered.*/- const inviteByCode = async (code: string): Promise<void> => {+ const inviteByFingerprint = async (code: string): Promise<void> => {try {const target = await ensureShared();- const result = await runSharingOperation('inviteToSharedManifest', { groupId: target.group.groupId, manifestId: target.manifest.manifestId, identityCode: code }, familySharingText.errors.inviteFailed);- setInviteNotice(familySharingText.invitationSent(result.username ?? ''));+ const result = await runSharingOperation('inviteToSharedManifest', { groupId: target.group.groupId, manifestId: target.manifest.manifestId, accountFingerprint: code }, sharingText.errors.inviteFailed);+ setInviteNotice(sharingText.invitationSent(result.username ?? ''));} catch (inviteError) {- throw new Error(sharingFailureMessage(inviteError, familySharingText.errors.inviteFailed));+ throw new Error(sharingFailureMessage(inviteError, sharingText.errors.inviteFailed));} finally {await shared.reload();}@@ -218,9 +218,9 @@ export const SharedFolderAccessModal: React.FC<ISharedFolderAccessModalProps> =* @param isSelf - whether the member is the current user.*/const removeAccess = (target: SharedFolder, member: GroupMemberInfo, isSelf: boolean): void => {- const title = isSelf ? familySharingText.leaveVault : familySharingText.revoke;- const message = isSelf ? familySharingText.leaveVaultConfirm(folder.Name) : familySharingText.revokeAccessConfirm(member.username, folder.Name);- const passwordPrompt = isSelf ? familySharingText.leaveVaultPasswordPrompt(folder.Name) : familySharingText.revokeAccessPasswordPrompt(member.username, folder.Name);+ const title = isSelf ? sharingText.leaveVault : sharingText.revoke;+ const message = isSelf ? sharingText.leaveVaultConfirm(folder.Name) : sharingText.revokeAccessConfirm(member.username, folder.Name);+ const passwordPrompt = isSelf ? sharingText.leaveVaultPasswordPrompt(folder.Name) : sharingText.revokeAccessPasswordPrompt(member.username, folder.Name);/*** Confirmed: ask for the password, then show the sheet with a spinner while the change runs and syncs in.@@ -248,7 +248,7 @@ export const SharedFolderAccessModal: React.FC<ISharedFolderAccessModalProps> =await revertIfEmpty(target.manifest.manifestId);await shared.reload();} catch (removeError) {- setError(sharingFailureMessage(removeError, familySharingText.errors.revokeAccessFailed));+ setError(sharingFailureMessage(removeError, sharingText.errors.revokeAccessFailed));} finally {setBusy(false);setIsHidden(false);@@ -280,7 +280,7 @@ export const SharedFolderAccessModal: React.FC<ISharedFolderAccessModalProps> =return;}revertCheckedRef.current = emptyOwnedManifestId;- void run(() => revertIfEmpty(emptyOwnedManifestId), familySharingText.errors.revokeAccessFailed);+ void run(() => revertIfEmpty(emptyOwnedManifestId), sharingText.errors.revokeAccessFailed);// eslint-disable-next-line react-hooks/exhaustive-deps}, [emptyOwnedManifestId]);@@ -416,26 +416,26 @@ export const SharedFolderAccessModal: React.FC<ISharedFolderAccessModalProps> =const renderPeople = (target: SharedFolder): React.ReactNode => (<View><View style={styles.peopleHeader}>- <ThemedText style={styles.peopleTitle}>{familySharingText.peopleTitle}</ThemedText>+ <ThemedText style={styles.peopleTitle}>{sharingText.peopleTitle}</ThemedText>{canInvite && (- <TouchableOpacity style={styles.addButton} onPress={openInviteWizard} disabled={busy} accessibilityRole="button" accessibilityLabel={familySharingText.invitePeople} hitSlop={8}>+ <TouchableOpacity style={styles.addButton} onPress={openInviteWizard} disabled={busy} accessibilityRole="button" accessibilityLabel={sharingText.invitePeople} hitSlop={8}><Ionicons name="add" size={24} color={colors.primary} /></TouchableOpacity>)}</View>{target.group.members.map(member => {const access = describeMemberAccess(target.group, target.manifest, member, shared.myUserId);- return renderRow(member.userId, access.isSelf ? `${member.username} (${familySharingText.you})` : member.username, roleLabel(member), (+ return renderRow(member.userId, access.isSelf ? `${member.username} (${sharingText.you})` : member.username, roleLabel(member), (<>- {access.canLeave && renderAction(familySharingText.leaveVault, () => removeAccess(target, member, true), true)}- {access.canRevoke && renderAction(familySharingText.revoke, () => removeAccess(target, member, false), true)}+ {access.canLeave && renderAction(sharingText.leaveVault, () => removeAccess(target, member, true), true)}+ {access.canRevoke && renderAction(sharingText.revoke, () => removeAccess(target, member, false), true)}</>));})}- {canAdministerGroup(target.group) && pendingInvitees(target).map(invitation => renderRow(invitation.id, invitation.inviteeUsername, familySharingText.invited, renderAction(familySharingText.withdraw, () => void run(async () => {+ {canAdministerGroup(target.group) && pendingInvitees(target).map(invitation => renderRow(invitation.id, invitation.inviteeUsername, sharingText.invited, renderAction(sharingText.withdraw, () => void run(async () => {await SharingService.withdrawInvitation(webApi, invitation.id);await revertIfEmpty(target.manifest.manifestId);- }, familySharingText.errors.invitationGone))))}+ }, sharingText.errors.invitationGone))))}</View>);@@ -453,25 +453,25 @@ export const SharedFolderAccessModal: React.FC<ISharedFolderAccessModalProps> ={error && <View style={[styles.banner, styles.bannerError]}><ThemedText style={styles.bannerErrorText}>{error}</ThemedText></View>}{notice && <View style={[styles.banner, styles.bannerSuccess]}><ThemedText style={styles.bannerSuccessText}>{notice}</ThemedText></View>}- {!isShared && <ThemedText style={styles.hintText}>{familySharingText.shareFolderHint}</ThemedText>}+ {!isShared && <ThemedText style={styles.hintText}>{sharingText.shareFolderHint}</ThemedText>}{/* The people with access; only listed once anybody besides this account is in. */}{current && hasOthers && renderPeople(current)}- {/* While an invitation waits, the code the invitee types to accept it is at hand here too. */}- {current && canAdministerGroup(current.group) && pendingInvitees(current).length > 0 && shared.ownCode && (+ {/* While an invitation waits, the fingerprint the invitee types to accept it is at hand here too. */}+ {current && canAdministerGroup(current.group) && pendingInvitees(current).length > 0 && shared.ownFingerprint && (<View style={styles.codeTip}>- <ThemedText style={styles.tipText}>{familySharingText.pendingCodeTip}</ThemedText>- <FamilyCode code={shared.ownCode} isSmall />+ <ThemedText style={styles.tipText}>{sharingText.pendingFingerprintTip}</ThemedText>+ <AccountFingerprint code={shared.ownFingerprint} isSmall /></View>)}{/* Nobody else in yet (or still a personal folder): inviting is the one thing to do, so it is shown prominently. */}- {current && !hasOthers && <ThemedText style={styles.hintText}>{familySharingText.notSharedYet}</ThemedText>}+ {current && !hasOthers && <ThemedText style={styles.hintText}>{sharingText.notSharedYet}</ThemedText>}{canInvite && !hasOthers && (<TouchableOpacity style={styles.primaryButton} activeOpacity={0.7} onPress={openInviteWizard}><Ionicons name="add" size={18} color={colors.primarySurfaceText} />- <ThemedText style={styles.primaryButtonText}>{familySharingText.invitePeople}</ThemedText>+ <ThemedText style={styles.primaryButtonText}>{sharingText.invitePeople}</ThemedText></TouchableOpacity>)}</View>@@ -480,11 +480,11 @@ export const SharedFolderAccessModal: React.FC<ISharedFolderAccessModalProps> =<InviteMemberWizardisOpen={isInviteOpen}- ownCode={shared.ownCode}+ ownFingerprint={shared.ownFingerprint}folderName={folder.Name}sharesFolder={!isShared}onLookup={lookup}- onInvite={inviteByCode}+ onInvite={inviteByFingerprint}people={invitable.map(person => ({ userId: person.userId, username: person.username, problem: memberKeyProblem(person) }))}onInvitePerson={inviteKnown}onClose={closeInviteWizard}diff --git a/apps/mobile-app/components/sharing/SharedFolderInvitationModal.tsx b/apps/mobile-app/components/sharing/SharedFolderInvitationModal.tsxindex 3030b2fbe..d28561524 100644--- a/apps/mobile-app/components/sharing/SharedFolderInvitationModal.tsx+++ b/apps/mobile-app/components/sharing/SharedFolderInvitationModal.tsx@@ -1,4 +1,4 @@-import { familySharingText, isInviterVerified } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText, isInviterVerified } from '@aliasvault/client/sharing/SharingView';import { SharingService } from '@aliasvault/client/sharing/SharingService';import React, { useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -25,13 +25,13 @@ interface ISharedFolderInvitationModalProps {/*** An invitation to a shared folder: accept or decline it. Accepting from an inviter this account has not verified yet- * first asks for their code.+ * first asks for their account fingerprint.*/export const SharedFolderInvitationModal: React.FC<ISharedFolderInvitationModalProps> = ({ invitation, folderName, onDone, onClose }) => {const { t } = useTranslation();const colors = useColors();const webApi = useWebApi();- const [askCode, setAskCode] = useState(false);+ const [askFingerprint, setAskCode] = useState(false);const [code, setCode] = useState('');const [error, setError] = useState<string | null>(null);const [busy, setBusy] = useState(false);@@ -106,28 +106,28 @@ export const SharedFolderInvitationModal: React.FC<ISharedFolderInvitationModalP}/**- * Accept, with the inviter's code when it was asked for; an engine that holds no certification of the inviter asks for it.+ * Accept, with the inviter's account fingerprint when it was asked for; an engine that holds no certification of the inviter asks for it.*/const accept = async (): Promise<void> => {- if (!askCode && !isInviterVerified(invitation)) {+ if (!askFingerprint && !isInviterVerified(invitation)) {setAskCode(true);return;}- if (askCode && code.trim().length === 0) {+ if (askFingerprint && code.trim().length === 0) {return;}setBusy(true);setError(null);try {- const result = await NativeVaultManager.runSharingOperation('acceptSharedManifestInvitation', JSON.stringify({ invitationId: invitation.id, identityCode: askCode ? code.trim() : undefined }));+ const result = await NativeVaultManager.runSharingOperation('acceptSharedManifestInvitation', JSON.stringify({ invitationId: invitation.id, accountFingerprint: askFingerprint ? code.trim() : undefined }));if (result.apiErrorCode === 'INVITER_NOT_VERIFIED') {setAskCode(true);}- unwrapSharingResult(result, familySharingText.errors.invitationGone);+ unwrapSharingResult(result, sharingText.errors.invitationGone);await onDone(true);} catch (acceptError) {- setError(sharingFailureMessage(acceptError, familySharingText.errors.invitationGone));+ setError(sharingFailureMessage(acceptError, sharingText.errors.invitationGone));} finally {setBusy(false);}@@ -143,38 +143,38 @@ export const SharedFolderInvitationModal: React.FC<ISharedFolderInvitationModalPawait SharingService.declineInvitation(webApi, invitation.id);await onDone(false);} catch (declineError) {- setError(sharingFailureMessage(declineError, familySharingText.errors.invitationGone));+ setError(sharingFailureMessage(declineError, sharingText.errors.invitationGone));} finally {setBusy(false);}};- const canAccept = !busy && !(askCode && code.trim().length === 0);+ const canAccept = !busy && !(askFingerprint && code.trim().length === 0);return (<ModalWrapperisOpenonClose={onClose}isSubmitting={busy}- title={askCode ? familySharingText.inviterCodeTitle(invitation.inviterUsername) : familySharingText.sharedWithYou(invitation.inviterUsername, folderName)}+ title={askFingerprint ? sharingText.inviterFingerprintTitle(invitation.inviterUsername) : sharingText.sharedWithYou(invitation.inviterUsername, folderName)}keyboardAvoidingshowHeaderBorder={false}showFooterBorder={false}>- {!askCode && (+ {!askFingerprint && (<>- <Text style={styles.bodyText}>{familySharingText.sharedWithYouHint}</Text>- <Text style={styles.mutedText}>{isInviterVerified(invitation) ? familySharingText.invitedByVerified(invitation.inviterUsername) : familySharingText.invitedBy(invitation.inviterUsername)}</Text>+ <Text style={styles.bodyText}>{sharingText.sharedWithYouHint}</Text>+ <Text style={styles.mutedText}>{isInviterVerified(invitation) ? sharingText.invitedByVerified(invitation.inviterUsername) : sharingText.invitedBy(invitation.inviterUsername)}</Text></>)}- {askCode && (+ {askFingerprint && (<>- <Text style={styles.bodyText}>{familySharingText.inviterCodeExplanation(invitation.inviterUsername)}</Text>+ <Text style={styles.bodyText}>{sharingText.inviterFingerprintExplanation(invitation.inviterUsername)}</Text><TextInputstyle={styles.codeInput}value={code}onChangeText={setCode}- placeholder={familySharingText.codePlaceholder}+ placeholder={sharingText.fingerprintPlaceholder}placeholderTextColor={colors.textMuted}keyboardType="number-pad"autoCorrect={false}@@ -186,11 +186,11 @@ export const SharedFolderInvitationModal: React.FC<ISharedFolderInvitationModalP)}{error && <Text style={styles.errorText}>{error}</Text>}<View style={styles.buttonRow}>- <TouchableOpacity style={[styles.modalButton, busy && styles.disabled]} disabled={busy} onPress={() => (askCode ? setAskCode(false) : void decline())}>- <Text style={styles.modalButtonText}>{askCode ? t('common.back') : familySharingText.decline}</Text>+ <TouchableOpacity style={[styles.modalButton, busy && styles.disabled]} disabled={busy} onPress={() => (askFingerprint ? setAskCode(false) : void decline())}>+ <Text style={styles.modalButtonText}>{askFingerprint ? t('common.back') : sharingText.decline}</Text></TouchableOpacity><TouchableOpacity style={[styles.modalButton, styles.modalButtonPrimary, !canAccept && styles.disabled]} disabled={!canAccept} onPress={() => void accept()}>- {busy ? <ActivityIndicator color={colors.white} size="small" /> : <Text style={styles.modalButtonPrimaryText}>{familySharingText.accept}</Text>}+ {busy ? <ActivityIndicator color={colors.white} size="small" /> : <Text style={styles.modalButtonPrimaryText}>{sharingText.accept}</Text>}</TouchableOpacity></View></ModalWrapper>diff --git a/apps/mobile-app/hooks/useSharedFolders.ts b/apps/mobile-app/hooks/useSharedFolders.tsindex dd2dd3b50..9098f58bc 100644--- a/apps/mobile-app/hooks/useSharedFolders.ts+++ b/apps/mobile-app/hooks/useSharedFolders.ts@@ -1,4 +1,4 @@-import { sharingView, type SharedFolder } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingView, type SharedFolder } from '@aliasvault/client/sharing/SharingView';import { SharingService } from '@aliasvault/client/sharing/SharingService';import { CapabilityKeys } from '@aliasvault/models/webapi';import { useFocusEffect } from 'expo-router';@@ -14,7 +14,7 @@ import type { GroupMemberInfo, ReceivedManifestInvitation } from '@aliasvault/mo/*** What the vault shows of sharing: the shared folders with their people, the invitations waiting for an answer, the- * people verified before and this account's own code.+ * people verified before and this account's own fingerprint.*/export type SharedFolders = {isEnabled: boolean;@@ -23,7 +23,7 @@ export type SharedFolders = {invitations: ReceivedManifestInvitation[];invitationNames: Record<string, string>;verifiedPeople: GroupMemberInfo[];- ownCode: string | null;+ ownFingerprint: string | null;reload: () => Promise<void>;};@@ -35,7 +35,7 @@ export function useSharedFolders(): SharedFolders {const isEnabled = useCapabilities()(CapabilityKeys.VaultSharing);const [view, setView] = useState<ReturnType<typeof sharingView>>(sharingView(null));const [invitationNames, setInvitationNames] = useState<Record<string, string>>({});- const [ownCode, setOwnCode] = useState<string | null>(null);+ const [ownFingerprint, setOwnFingerprint] = useState<string | null>(null);const reload = useCallback(async (): Promise<void> => {if (!isEnabled) {@@ -45,8 +45,8 @@ export function useSharedFolders(): SharedFolders {const overview = await SharingService.getOverview(webApi);setView(sharingView(overview));setInvitationNames(await SharingService.openInvitationNames(overview.receivedInvitations, encryptedName => NativeVaultManager.decryptInvitationName(encryptedName)));- // The own code is derived natively from the signing private key, which only the native layer can open.- setOwnCode(await NativeVaultManager.getSigningKeyFingerprint());+ // The own fingerprint is derived natively from the signing private key, which only the native layer can open.+ setOwnFingerprint(await NativeVaultManager.getSigningKeyFingerprint());} catch {// Offline or not reachable: the vault keeps showing what it already knew.}@@ -61,5 +61,5 @@ export function useSharedFolders(): SharedFolders {return (): void => subscription.remove();}, [reload]);- return { isEnabled, ...view, invitationNames, ownCode, reload };+ return { isEnabled, ...view, invitationNames, ownFingerprint, reload };}diff --git a/apps/mobile-app/ios/NativeVaultManager/NativeVaultManager.swift b/apps/mobile-app/ios/NativeVaultManager/NativeVaultManager.swiftindex 77f59c71c..423ef2a48 100644--- a/apps/mobile-app/ios/NativeVaultManager/NativeVaultManager.swift+++ b/apps/mobile-app/ios/NativeVaultManager/NativeVaultManager.swift@@ -142,7 +142,7 @@ public class NativeVaultManager: NSObject {resolve(vaultStore.decryptWithAccountPrivateKey(encryptedName))}- /// The identity code of the account's own signing key; nil while locked or when the account has no signing key yet.+ /// The account fingerprint of the account's own signing key; nil while locked or when the account has no signing key yet.@objcfunc getSigningKeyFingerprint(_ resolve: @escaping RCTPromiseResolveBlock,rejecter reject: @escaping RCTPromiseRejectBlock) {diff --git a/apps/mobile-app/ios/VaultStoreKit/Services/VaultSync.swift b/apps/mobile-app/ios/VaultStoreKit/Services/VaultSync.swiftindex 3f41c4c8e..50f15b05c 100644--- a/apps/mobile-app/ios/VaultStoreKit/Services/VaultSync.swift+++ b/apps/mobile-app/ios/VaultStoreKit/Services/VaultSync.swift@@ -237,7 +237,7 @@ internal final class VaultSync {}/// The engine operations the sharing screen may ask for.- private static let sharingOperations: Set<String> = ["createSharedManifest", "inviteToSharedManifest", "updateSharedManifest", "lookupIdentityCode", "acceptSharedManifestInvitation"]+ private static let sharingOperations: Set<String> = ["createSharedManifest", "inviteToSharedManifest", "updateSharedManifest", "lookupAccountFingerprint", "acceptSharedManifestInvitation"]/// The forced logouts by the engine's reason.private static let logoutErrors: [String: AppError] = [diff --git a/apps/mobile-app/ios/VaultStoreKit/Services/VaultSyncEngine.swift b/apps/mobile-app/ios/VaultStoreKit/Services/VaultSyncEngine.swiftindex 49422a831..729528f23 100644--- a/apps/mobile-app/ios/VaultStoreKit/Services/VaultSyncEngine.swift+++ b/apps/mobile-app/ios/VaultStoreKit/Services/VaultSyncEngine.swift@@ -18,7 +18,7 @@ public final class VaultSyncEngine {private static let encryptedVekStateKey = "encryptedVek"private static let encryptedAccountPrivateKeyStateKey = "encryptedAccountPrivateKey"- /// Engine state key holding the account signing private key encrypted with the Account Key, which the own identity code derives from.+ /// Engine state key holding the account signing private key encrypted with the Account Key, which the own account fingerprint derives from.static let encryptedSigningPrivateKeyStateKey = "encryptedSigningPrivateKey"/// Engine state key that lives in the native store instead (the login writes it there), routed on read and write.diff --git a/apps/mobile-app/ios/VaultStoreKit/VaultStore+Crypto.swift b/apps/mobile-app/ios/VaultStoreKit/VaultStore+Crypto.swiftindex 21e482247..eca7eb58b 100644--- a/apps/mobile-app/ios/VaultStoreKit/VaultStore+Crypto.swift+++ b/apps/mobile-app/ios/VaultStoreKit/VaultStore+Crypto.swift@@ -148,9 +148,9 @@ extension VaultStore {return String(data: plaintext, encoding: .utf8)}- /// The identity code of the account's own signing key, derived from the private key the sync engine cached, or nil+ /// The account fingerprint of the account's own signing key, derived from the private key the sync engine cached, or nil/// while the vault is locked or the account has no signing key yet.- /// Other platform implementations: SharingService.ownIdentityCode (core/client), VaultStore.signingKeyFingerprint (Android).+ /// Other platform implementations: SharingService.ownAccountFingerprint (core/client), VaultStore.signingKeyFingerprint (Android).public func signingKeyFingerprint() -> String? {guard let accountKeyBase64 = accountKeyBase64, let accountKey = Data(base64Encoded: accountKeyBase64),let encryptedSigningPrivateKey = VaultSyncEngine.persistedState(forKey: VaultSyncEngine.encryptedSigningPrivateKeyStateKey, in: userDefaults) as? String else {diff --git a/apps/mobile-app/utils/SharingErrors.ts b/apps/mobile-app/utils/SharingErrors.tsindex db687e83e..50c3d8648 100644--- a/apps/mobile-app/utils/SharingErrors.ts+++ b/apps/mobile-app/utils/SharingErrors.ts@@ -1,5 +1,5 @@import { apiErrorCodeOf } from '@aliasvault/client/api/errors/ApiRequestError';-import { familySharingText, sharingErrorMessage } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText, sharingErrorMessage } from '@aliasvault/client/sharing/SharingView';import NativeVaultManager from '@/specs/NativeVaultManager';@@ -38,7 +38,7 @@ export function unwrapSharingResult(result: NativeSharingResult, fallback: strin}if (result.vaultUpgradeRequired) {- throw new SharingOperationError(familySharingText.errors.vaultUpgradeRequired);+ throw new SharingOperationError(sharingText.errors.vaultUpgradeRequired);}const code = result.apiErrorCode ?? result.error;diff --git a/apps/server/AliasVault.Api/Controllers/V2/GroupsController.cs b/apps/server/AliasVault.Api/Controllers/V2/GroupsController.csindex 4df8045c3..a790bb445 100644--- a/apps/server/AliasVault.Api/Controllers/V2/GroupsController.cs+++ b/apps/server/AliasVault.Api/Controllers/V2/GroupsController.cs@@ -37,9 +37,9 @@ using Microsoft.Extensions.Caching.Memory;/// <param name="timeProvider">Time provider.</param>/// <param name="cache">Memory cache holding the server's SRP ephemeral between the delete initiate and confirm calls.</param>/// <param name="authLoggingService">Auth logging service, recording shared manifest creation and the master password checks guarding deletion.</param>-/// <param name="identityCodeLookupRateLimit">Limits how many identity codes a caller may look up.</param>+/// <param name="accountFingerprintLookupRateLimit">Limits how many account fingerprints a caller may look up.</param>[ApiVersion("2")]-public class GroupsController(IAliasServerDbContextFactory dbContextFactory, UserManager<AliasVaultUser> userManager, TimeProvider timeProvider, IMemoryCache cache, AuthLoggingService authLoggingService, IdentityCodeLookupRateLimitService identityCodeLookupRateLimit) : AuthenticatedRequestController(userManager)+public class GroupsController(IAliasServerDbContextFactory dbContextFactory, UserManager<AliasVaultUser> userManager, TimeProvider timeProvider, IMemoryCache cache, AuthLoggingService authLoggingService, AccountFingerprintLookupRateLimitService accountFingerprintLookupRateLimit) : AuthenticatedRequestController(userManager){/// <summary>/// Get the overview of the caller's shared groups and the access offers awaiting their answer.@@ -161,15 +161,15 @@ public class GroupsController(IAliasServerDbContextFactory dbContextFactory, Use}/// <summary>- /// Find the account an identity code (the fingerprint of its signing key) belongs to. The caller's client checks the returned- /// key against the code before it certifies the key or invites the account. Not tied to a group, so a folder can be shared- /// only once the person it is shared with has been found by their code.+ /// Find the account an account fingerprint (the fingerprint of its signing key) belongs to. The caller's client checks the returned+ /// key against the fingerprint before it certifies the key or invites the account. Not tied to a group, so a folder can be shared+ /// only once the person it is shared with has been found by their account fingerprint./// </summary>- /// <param name="model">The identity code.</param>+ /// <param name="model">The account fingerprint.</param>/// <returns>The account and its signing public key.</returns>[HttpPost("lookup")][RequireCapability(CapabilityKeys.VaultSharing)]- public async Task<IActionResult> LookupIdentityCode([FromBody] IdentityCodeLookupRequest model)+ public async Task<IActionResult> LookupAccountFingerprint([FromBody] AccountFingerprintLookupRequest model){await using var context = await dbContextFactory.CreateDbContextAsync();var me = await GetCurrentUserAsync();@@ -178,12 +178,12 @@ public class GroupsController(IAliasServerDbContextFactory dbContextFactory, Usereturn ApiError.Result(ApiErrorCode.NOT_AUTHENTICATED, 401);}- if (!identityCodeLookupRateLimit.TryConsume(me.Id))+ if (!accountFingerprintLookupRateLimit.TryConsume(me.Id)){return ApiError.Result(ApiErrorCode.RATE_LIMIT_EXCEEDED, 429);}- // Unknown codes, and a code shared by two keys, all answer the same, so the endpoint reveals nothing without a full code.+ // An unknown fingerprint, and a fingerprint shared by two keys, both answer the same, so the endpoint reveals nothing without a full fingerprint.var fingerprint = Signing.NormalizeFingerprint(model.Code);var matches = fingerprint.Length != Signing.FingerprintDigits ? [] : await context.UserSigningKeys.Where(k => k.IsPrimary && k.Fingerprint == fingerprint)@@ -193,12 +193,12 @@ public class GroupsController(IAliasServerDbContextFactory dbContextFactory, Useif (matches.Count != 1 || matches[0].UserId == me.Id){- return ApiError.Result(ApiErrorCode.IDENTITY_CODE_NOT_FOUND, 404);+ return ApiError.Result(ApiErrorCode.ACCOUNT_FINGERPRINT_NOT_FOUND, 404);}// The account public key lets the admin's client encrypt a shared manifest's key for an account that is not a member yet.var accountKey = (await GrantHelper.GetPrimaryKeysAsync(context, [matches[0].UserId])).GetValueOrDefault(matches[0].UserId);- return Ok(new IdentityCodeLookupResponse+ return Ok(new AccountFingerprintLookupResponse{UserId = matches[0].UserId,Username = matches[0].Username,@@ -228,13 +228,13 @@ public class GroupsController(IAliasServerDbContextFactory dbContextFactory, Usevar subjectKey = await GrantHelper.GetPrimarySigningKeyAsync(context, model.SubjectUserId);if (subjectKey is null || !string.Equals(subjectKey, model.SubjectSigningPublicKey, StringComparison.Ordinal)){- return ApiError.Result(ApiErrorCode.IDENTITY_CODE_NOT_FOUND, 404);+ return ApiError.Result(ApiErrorCode.ACCOUNT_FINGERPRINT_NOT_FOUND, 404);}// A certification is only of use between accounts that share, or are about to: an admin and anyone, or two members.if (!await MayCertifyAsync(context, me.Id, model.SubjectUserId)){- return ApiError.Result(ApiErrorCode.IDENTITY_CODE_NOT_FOUND, 404);+ return ApiError.Result(ApiErrorCode.ACCOUNT_FINGERPRINT_NOT_FOUND, 404);}var signerPublicKey = await GrantHelper.GetPrimarySigningKeyAsync(context, me.Id);@@ -415,7 +415,7 @@ public class GroupsController(IAliasServerDbContextFactory dbContextFactory, Use}/*- * Access goes to a member of the group, or to an account the caller certified with its identity code: accepting+ * Access goes to a member of the group, or to an account the caller certified with its account fingerprint: accepting* such an offer also makes them a member. Without the certification nobody can be invited by a bare user id.*/if (!await GroupHelper.IsSharedGroupMemberAsync(context, groupId, model.UserId) && !await HasCertifiedAsync(context, me.Id, model.UserId, await GrantHelper.GetPrimarySigningKeyAsync(context, model.UserId)))@@ -873,7 +873,7 @@ public class GroupsController(IAliasServerDbContextFactory dbContextFactory, Usereturn await CloseAndCommitAsync(context, transaction, invitation, GroupInvitationState.Revoked, ApiErrorCode.INVITATION_NOT_FOUND, 404);}- // The invitee has certified the key the offer is signed with (their client did, with the inviter's identity code).+ // The invitee has certified the key the offer is signed with (their client did, with the inviter's account fingerprint).if (!await HasCertifiedAsync(context, me.Id, invitation.InviterUserId, invitation.GrantSignerPublicKey)){return ApiError.Result(ApiErrorCode.INVITER_NOT_VERIFIED, 400);@@ -1223,7 +1223,7 @@ public class GroupsController(IAliasServerDbContextFactory dbContextFactory, Use/// <summary>/// Whether a certification by <paramref name="certifierUserId"/> of <paramref name="subjectUserId"/> can serve a sharing flow: the certifier- /// administers a group (invites by code), the subject invited the certifier, or the two share a group.+ /// administers a group (invites by account fingerprint), the subject invited the certifier, or the two share a group./// </summary>/// <param name="context">The database context.</param>/// <param name="certifierUserId">The user making the certification.</param>diff --git a/apps/server/AliasVault.Api/Program.cs b/apps/server/AliasVault.Api/Program.csindex 4232fcf20..b8951f5d3 100644--- a/apps/server/AliasVault.Api/Program.cs+++ b/apps/server/AliasVault.Api/Program.cs@@ -99,7 +99,7 @@ builder.Services.AddScoped<IpBlockListService>();builder.Services.AddScoped<MobileLoginRateLimitService>();builder.Services.AddSingleton<FaviconRateLimitService>();builder.Services.AddSingleton<TakenAliasLookupRateLimitService>();-builder.Services.AddSingleton<IdentityCodeLookupRateLimitService>();+builder.Services.AddSingleton<AccountFingerprintLookupRateLimitService>();builder.Services.AddScoped<RateLimitService>();builder.Services.AddScoped<CapabilityService>();builder.Services.AddScoped<TokenService>();diff --git a/apps/server/AliasVault.Api/Services/IdentityCodeLookupRateLimitService.cs b/apps/server/AliasVault.Api/Services/AccountFingerprintLookupRateLimitService.cssimilarity index 84%rename from apps/server/AliasVault.Api/Services/IdentityCodeLookupRateLimitService.csrename to apps/server/AliasVault.Api/Services/AccountFingerprintLookupRateLimitService.csindex 81470abc3..bfc02f885 100644--- a/apps/server/AliasVault.Api/Services/IdentityCodeLookupRateLimitService.cs+++ b/apps/server/AliasVault.Api/Services/AccountFingerprintLookupRateLimitService.cs@@ -1,5 +1,5 @@//------------------------------------------------------------------------// <copyright file="IdentityCodeLookupRateLimitService.cs" company="aliasvault">+// <copyright file="AccountFingerprintLookupRateLimitService.cs" company="aliasvault">// Copyright (c) aliasvault. All rights reserved.// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.// </copyright>@@ -11,9 +11,9 @@ using System;using System.Threading.RateLimiting;/// <summary>-/// In-memory per-user limit on identity code lookups, so a family admin cannot probe the code space for accounts.+/// In-memory per-user limit on account fingerprint lookups, so a caller cannot probe the fingerprint space for accounts./// </summary>-public sealed class IdentityCodeLookupRateLimitService : IDisposable+public sealed class AccountFingerprintLookupRateLimitService : IDisposable{/// <summary>/// Lookups a user can make in a burst.diff --git a/apps/server/Databases/AliasServerDb/GroupType.cs b/apps/server/Databases/AliasServerDb/GroupType.csindex 0c5cffd51..bafdb1fbc 100644--- a/apps/server/Databases/AliasServerDb/GroupType.cs+++ b/apps/server/Databases/AliasServerDb/GroupType.cs@@ -18,7 +18,7 @@ public enum GroupTypePersonal = 0,/// <summary>- /// A group users join by invitation to be able to participate in shared manifests. Represents "family" in UI.+ /// A group users join by invitation to be able to participate in shared manifests. Shown as a shared folder in the apps./// </summary>Shared = 1,}diff --git a/apps/server/Databases/AliasServerDb/UserKeyCertification.cs b/apps/server/Databases/AliasServerDb/UserKeyCertification.csindex d836636f2..73de7726f 100644--- a/apps/server/Databases/AliasServerDb/UserKeyCertification.cs+++ b/apps/server/Databases/AliasServerDb/UserKeyCertification.cs@@ -11,7 +11,7 @@ using System.ComponentModel.DataAnnotations.Schema;/// <summary>/// One user's signed statement that a signing public key belongs to another user, made after checking the key against that-/// user's identity code (the family code in the apps). Only the certifier's client trusts it, by verifying it under its own+/// user's account fingerprint. Only the certifier's client trusts it, by verifying it under its own/// signing key./// </summary>public class UserKeyCertificationdiff --git a/apps/server/Databases/AliasServerDb/UserSigningKey.cs b/apps/server/Databases/AliasServerDb/UserSigningKey.csindex 028444597..b279d9273 100644--- a/apps/server/Databases/AliasServerDb/UserSigningKey.cs+++ b/apps/server/Databases/AliasServerDb/UserSigningKey.cs@@ -47,8 +47,8 @@ public class UserSigningKeypublic required string PublicKey { get; set; }/// <summary>- /// Gets or sets the fingerprint of <see cref="PublicKey"/> (20 digits, no separators): the user's identity code (the family code in- /// the apps) that they give to a group admin, by which the admin looks them up.+ /// Gets or sets the fingerprint of <see cref="PublicKey"/> (20 digits, no separators): the user's account fingerprint, which they give to+ /// a group admin, by which the admin looks them up./// </summary>[StringLength(20)]public string? Fingerprint { get; set; }diff --git a/apps/server/Shared/AliasVault.Shared/Models/Enums/ApiErrorCode.cs b/apps/server/Shared/AliasVault.Shared/Models/Enums/ApiErrorCode.csindex 7264c08db..fdbc0dff9 100644--- a/apps/server/Shared/AliasVault.Shared/Models/Enums/ApiErrorCode.cs+++ b/apps/server/Shared/AliasVault.Shared/Models/Enums/ApiErrorCode.cs@@ -352,9 +352,9 @@ public enum ApiErrorCodeTWO_FACTOR_NOT_ENABLED,/// <summary>- /// No account has a signing key whose fingerprint is the given identity code.+ /// No account has a signing key whose fingerprint is the given account fingerprint./// </summary>- IDENTITY_CODE_NOT_FOUND,+ ACCOUNT_FINGERPRINT_NOT_FOUND,/// <summary>/// The shared manifest still has other members or open invitations, so it cannot become personal again.@@ -362,12 +362,12 @@ public enum ApiErrorCodeSHARED_MANIFEST_IN_USE,/// <summary>- /// The caller has not certified the member's current signing key with their identity code.+ /// The caller has not certified the member's current signing key with their account fingerprint./// </summary>MEMBER_NOT_VERIFIED,/// <summary>- /// The caller has not certified the inviter's current signing key with their identity code.+ /// The caller has not certified the inviter's current signing key with their account fingerprint./// </summary>INVITER_NOT_VERIFIED,}diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Groups/IdentityCodeLookupRequest.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Groups/AccountFingerprintLookupRequest.cssimilarity index 58%rename from apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Groups/IdentityCodeLookupRequest.csrename to apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Groups/AccountFingerprintLookupRequest.csindex fe5490f36..ac092caf0 100644--- a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Groups/IdentityCodeLookupRequest.cs+++ b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Groups/AccountFingerprintLookupRequest.cs@@ -1,5 +1,5 @@//------------------------------------------------------------------------// <copyright file="IdentityCodeLookupRequest.cs" company="aliasvault">+// <copyright file="AccountFingerprintLookupRequest.cs" company="aliasvault">// Copyright (c) aliasvault. All rights reserved.// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.// </copyright>@@ -8,10 +8,10 @@namespace AliasVault.Shared.Models.WebApi.V2.Groups;/// <summary>-/// Look up the account an identity code belongs to (POST /v2/Groups/lookup).+/// Look up the account an account fingerprint belongs to (POST /v2/Groups/lookup)./// </summary>-public class IdentityCodeLookupRequest+public class AccountFingerprintLookupRequest{- /// <summary>Gets or sets the identity code the other person gave; separators are ignored.</summary>+ /// <summary>Gets or sets the account fingerprint the other person gave; separators are ignored.</summary>public required string Code { get; set; }}diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Groups/IdentityCodeLookupResponse.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Groups/AccountFingerprintLookupResponse.cssimilarity index 80%rename from apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Groups/IdentityCodeLookupResponse.csrename to apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Groups/AccountFingerprintLookupResponse.csindex 55cb8a528..3468394fe 100644--- a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Groups/IdentityCodeLookupResponse.cs+++ b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Groups/AccountFingerprintLookupResponse.cs@@ -1,5 +1,5 @@//------------------------------------------------------------------------// <copyright file="IdentityCodeLookupResponse.cs" company="aliasvault">+// <copyright file="AccountFingerprintLookupResponse.cs" company="aliasvault">// Copyright (c) aliasvault. All rights reserved.// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.// </copyright>@@ -8,9 +8,9 @@namespace AliasVault.Shared.Models.WebApi.V2.Groups;/// <summary>-/// The account an identity code belongs to. The client checks <see cref="SigningPublicKey"/> against the code itself.+/// The account an account fingerprint belongs to. The client checks <see cref="SigningPublicKey"/> against the fingerprint itself./// </summary>-public class IdentityCodeLookupResponse+public class AccountFingerprintLookupResponse{/// <summary>Gets or sets the account's user id.</summary>public required string UserId { get; set; }@@ -18,7 +18,7 @@ public class IdentityCodeLookupResponse/// <summary>Gets or sets the account's username.</summary>public required string Username { get; set; }- /// <summary>Gets or sets the account's signing public key (base64), whose fingerprint is the code.</summary>+ /// <summary>Gets or sets the account's signing public key (base64), whose fingerprint was looked up.</summary>public required string SigningPublicKey { get; set; }/// <summary>Gets or sets the id of the account public key a vault key is encrypted for them with, if they have one.</summary>diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Groups/GroupOverviewResponse.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Groups/GroupOverviewResponse.csindex 7185256c6..228b44231 100644--- a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Groups/GroupOverviewResponse.cs+++ b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Groups/GroupOverviewResponse.cs@@ -24,7 +24,7 @@ public class GroupOverviewResponse/// <summary>/// Gets or sets the people whose current signing key the caller certified, with the keys to invite them to a shared- /// manifest without their identity code. The caller's client checks each certification itself.+ /// manifest without their account fingerprint. The caller's client checks each certification itself./// </summary>public List<GroupMemberInfo> VerifiedPeople { get; set; } = [];diff --git a/apps/server/Utilities/AliasVault.Cryptography/Signing.cs b/apps/server/Utilities/AliasVault.Cryptography/Signing.csindex 90e1c9f6e..e4dd07055 100644--- a/apps/server/Utilities/AliasVault.Cryptography/Signing.cs+++ b/apps/server/Utilities/AliasVault.Cryptography/Signing.cs@@ -48,7 +48,7 @@ public static class Signingpublic const string KeyCertificationLabel = "aliasvault/v1/sig/key-certification";/// <summary>- /// The label under which a signing public key is hashed into its fingerprint, the user's identity code (the family code in the apps).+ /// The label under which a signing public key is hashed into its fingerprint, the user's account fingerprint./// </summary>public const string FingerprintLabel = "aliasvault/v1/signing-key-fingerprint";diff --git a/apps/web/src/components/email/RecentEmails.tsx b/apps/web/src/components/email/RecentEmails.tsxindex ef8873cc9..51fc4b3d9 100644--- a/apps/web/src/components/email/RecentEmails.tsx+++ b/apps/web/src/components/email/RecentEmails.tsx@@ -1,7 +1,7 @@import { apiErrorCodeOf } from '@aliasvault/client/api/errors/ApiRequestError';import { type AliasOwnerNotice, aliasOwnerErrorText, aliasOwnerNotice, moveAliasHere } from '@aliasvault/client/email/AliasOwner';import { decryptEmailList } from '@aliasvault/client/email/EmailDecryption';-import { familySharingText } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText } from '@aliasvault/client/sharing/SharingView';import React, { useCallback, useEffect, useRef, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -196,7 +196,7 @@ const RecentEmails: React.FC<RecentEmailsProps> = ({ emailAddress, manifestId })* Move the alias to this item's vault after confirmation, then reload.*/const moveHere = async (): Promise<void> => {- if (!ownerNotice || !await showConfirmation(familySharingText.aliasOwner.moveHere, ownerNotice.moveConfirm, t('common.confirm'), t('common.cancel'))) {+ if (!ownerNotice || !await showConfirmation(sharingText.aliasOwner.moveHere, ownerNotice.moveConfirm, t('common.confirm'), t('common.cancel'))) {return;}try {@@ -240,7 +240,7 @@ const RecentEmails: React.FC<RecentEmailsProps> = ({ emailAddress, manifestId })</div>{!isLoading && error.length === 0 && ownerNotice && (- <WarningBox className="mt-4" actions={ownerNotice.canMove && <Button id="move-alias-here" onClick={() => void moveHere()}>{familySharingText.aliasOwner.moveHere}</Button>}>+ <WarningBox className="mt-4" actions={ownerNotice.canMove && <Button id="move-alias-here" onClick={() => void moveHere()}>{sharingText.aliasOwner.moveHere}</Button>}><p>{ownerNotice.notice}</p></WarningBox>)}diff --git a/apps/web/src/components/folders/FolderIcon.tsx b/apps/web/src/components/folders/FolderIcon.tsxindex f5a7d6f64..35ced0314 100644--- a/apps/web/src/components/folders/FolderIcon.tsx+++ b/apps/web/src/components/folders/FolderIcon.tsx@@ -1,4 +1,4 @@-import { familySharingText } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText } from '@aliasvault/client/sharing/SharingView';import React from 'react';import Icon from '@/components/shared/Icon';@@ -21,7 +21,7 @@ const FolderIcon: React.FC<FolderIconProps> = ({ isShared = false, variant = 'fi<Icon name="folder" className={className} />)}{isShared && (- <span title={familySharingText.sharedVault} className={`absolute -bottom-1 -right-1 flex items-center justify-center w-2.5 h-2.5 rounded-full ring-1 ${badgeClassName}`}>+ <span title={sharingText.sharedVault} className={`absolute -bottom-1 -right-1 flex items-center justify-center w-2.5 h-2.5 rounded-full ring-1 ${badgeClassName}`}><Icon name="users" className="w-2 h-2 text-primary-500 dark:text-primary-400" /></span>)}diff --git a/apps/web/src/components/settings/FamilyCode.tsx b/apps/web/src/components/settings/AccountFingerprint.tsxsimilarity index 82%rename from apps/web/src/components/settings/FamilyCode.tsxrename to apps/web/src/components/settings/AccountFingerprint.tsxindex 26a042cba..a2820778b 100644--- a/apps/web/src/components/settings/FamilyCode.tsx+++ b/apps/web/src/components/settings/AccountFingerprint.tsx@@ -1,10 +1,10 @@-import { familySharingText } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText } from '@aliasvault/client/sharing/SharingView';import React, { useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';import Icon from '@/components/shared/Icon';-type FamilyCodeProps = {+type AccountFingerprintProps = {code: string;/** The id of the code text, for the one copy on the page that tests read. */id?: string;@@ -17,10 +17,10 @@ type FamilyCodeProps = {const COPIED_MS = 2000;/**- * The account's own family code; clicking anywhere on it copies the code. The code is not secret, so it is copied without the clipboard+ * The account's own fingerprint; clicking anywhere on it copies it. The fingerprint is not secret, so it is copied without the clipboard* clear timer that vault values get.*/-const FamilyCode: React.FC<FamilyCodeProps> = ({ code, id, className = '', isSmall = false }) => {+const AccountFingerprint: React.FC<AccountFingerprintProps> = ({ code, id, className = '', isSmall = false }) => {const { t } = useTranslation();const [isCopied, setIsCopied] = useState(false);@@ -53,7 +53,7 @@ const FamilyCode: React.FC<FamilyCodeProps> = ({ code, id, className = '', isSmaclassName={`inline-flex flex-wrap items-center rounded-full text-left bg-primary-50 hover:bg-primary-100 dark:bg-primary-900/30 dark:hover:bg-primary-900/50 border border-primary-200 dark:border-primary-800 ${isSmall ? 'gap-x-2 gap-y-0.5 pl-3 pr-1 py-1' : 'gap-x-3 gap-y-1 pl-4 pr-1.5 py-1.5'} ${className}`}><Icon name="shield-check" className={`${isSmall ? 'w-4 h-4' : 'w-5 h-5'} shrink-0 text-primary-500`} />- <span className={`${isSmall ? 'text-xs' : 'text-sm'} text-gray-700 dark:text-gray-300`}>{familySharingText.yourCode}</span>+ <span className={`${isSmall ? 'text-xs' : 'text-sm'} text-gray-700 dark:text-gray-300`}>{sharingText.yourFingerprint}</span><span id={id} className={`font-mono ${isSmall ? 'text-sm' : 'text-base'} font-semibold tracking-wider whitespace-nowrap text-gray-900 dark:text-white`}>{code}</span><span className={`inline-flex items-center gap-1.5 ${isSmall ? 'px-2 py-0.5 text-xs' : 'px-3 py-1 text-sm'} font-medium text-primary-700 dark:text-primary-300`}><Icon name={isCopied ? 'check' : 'duplicate'} className={isSmall ? 'w-3.5 h-3.5' : 'w-4 h-4'} />@@ -63,4 +63,4 @@ const FamilyCode: React.FC<FamilyCodeProps> = ({ code, id, className = '', isSma);};-export default FamilyCode;+export default AccountFingerprint;diff --git a/apps/web/src/components/settings/InviteMemberWizard.tsx b/apps/web/src/components/settings/InviteMemberWizard.tsxindex 6e9089cf7..d68d66ee6 100644--- a/apps/web/src/components/settings/InviteMemberWizard.tsx+++ b/apps/web/src/components/settings/InviteMemberWizard.tsx@@ -1,9 +1,9 @@-import { familySharingText, splitAround } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText, splitAround } from '@aliasvault/client/sharing/SharingView';import React, { useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';import AlertMessageError from '@/components/alerts/AlertMessageError';-import FamilyCode from '@/components/settings/FamilyCode';+import AccountFingerprint from '@/components/settings/AccountFingerprint';import Button from '@/components/shared/Button';import FormModal from '@/components/shared/FormModal';import Icon from '@/components/shared/Icon';@@ -21,14 +21,14 @@ const emphasized = (text: string, value: string): React.ReactNode => {};/**- * The account a code belongs to.+ * The account an account fingerprint belongs to.*/-export type FamilyCodeAccount = {+export type AccountLookupResult = {username: string;};/**- * Somebody verified before, who can be invited without their code.+ * Somebody verified before, who can be invited without their account fingerprint.*/export type KnownPerson = {userId: string;@@ -39,13 +39,13 @@ export type KnownPerson = {type InviteMemberWizardProps = {isOpen: boolean;- /** This account's own code, which the invitee needs to accept. */- ownFamilyCode: string | null;- /** Find the account behind a code; throws an error with the message to show. */- onLookup: (code: string) => Promise<FamilyCodeAccount>;- /** Invite the account behind a code; throws an error with the message to show. */+ /** This account's own fingerprint, which the invitee needs to accept. */+ ownFingerprint: string | null;+ /** Find the account behind an account fingerprint; throws an error with the message to show. */+ onLookup: (code: string) => Promise<AccountLookupResult>;+ /** Invite the account behind an account fingerprint; throws an error with the message to show. */onInvite: (code: string) => Promise<void>;- /** The people verified before who are not in the folder yet, offered before the code field. */+ /** The people verified before who are not in the folder yet, offered before the fingerprint field. */people?: KnownPerson[];/** Invite somebody verified before; throws an error with the message to show. */onInvitePerson?: (userId: string) => Promise<void>;@@ -62,15 +62,15 @@ const STEP_COUNT = 3;const CLOSE_DELAY_SECONDS = 3;/**- * Three step wizard that picks somebody verified before or takes a new person's code, confirms who gets invited, and hands- * out this account's own code for them to accept with.+ * Three step wizard that picks somebody verified before or takes a new person's account fingerprint, confirms who gets invited, and hands+ * out this account's own fingerprint for them to accept with.*/-const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownFamilyCode, onLookup, onInvite, people = [], onInvitePerson, folderName, sharesFolder = false, onClose }) => {+const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownFingerprint, onLookup, onInvite, people = [], onInvitePerson, folderName, sharesFolder = false, onClose }) => {const { t } = useTranslation();const [step, setStep] = useState(1);const [code, setCode] = useState('');- const [account, setAccount] = useState<FamilyCodeAccount | null>(null);- /** The person verified before who was picked instead of entering a code. */+ const [account, setAccount] = useState<AccountLookupResult | null>(null);+ /** The person verified before who was picked instead of entering a fingerprint. */const [selected, setSelected] = useState<KnownPerson | null>(null);const [error, setError] = useState<string | null>(null);const [isBusy, setIsBusy] = useState(false);@@ -114,7 +114,7 @@ const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownFami};/**- * Ask to confirm the person picked, or look the code up first and ask to confirm who it belongs to.+ * Ask to confirm the person picked, or look the fingerprint up first and ask to confirm who it belongs to.*/const lookup = (): Promise<void> => runStep(async () => {setAccount(selected ? { username: selected.username } : await onLookup(trimmedCode));@@ -122,7 +122,7 @@ const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownFami});/**- * Invite the person picked or the account behind the code, then show this account's own code.+ * Invite the person picked or the account behind the account fingerprint, then show this account's own fingerprint.*/const invite = (): Promise<void> => runStep(async () => {if (selected && onInvitePerson) {@@ -164,15 +164,15 @@ const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownFamiconst footer = (<>{step === 1 && <Button id="invite-wizard-next" isDisabled={isBusy || (selected === null && trimmedCode.length === 0)} onClick={confirm}>{t('common.next')}</Button>}- {step === 2 && <Button id="invite-wizard-confirm" isDisabled={isBusy} onClick={confirm}>{familySharingText.invite}</Button>}- {step === 3 && <Button id="invite-wizard-close" isDisabled={!canClose} onClick={close}>{closeCountdown > 0 ? familySharingText.closeCountdown(closeCountdown) : t('common.close')}</Button>}+ {step === 2 && <Button id="invite-wizard-confirm" isDisabled={isBusy} onClick={confirm}>{sharingText.invite}</Button>}+ {step === 3 && <Button id="invite-wizard-close" isDisabled={!canClose} onClick={close}>{closeCountdown > 0 ? sharingText.closeCountdown(closeCountdown) : t('common.close')}</Button>}{step === 1 && <Button color="secondary" isDisabled={isBusy} onClick={close}>{t('common.cancel')}</Button>}{step === 2 && <Button color="secondary" isDisabled={isBusy} onClick={() => setStep(1)}>{t('common.back')}</Button>}</>);return (- <FormModal isOpen={isOpen} title={familySharingText.invitePeople} maxWidth="xl" closeOnOverlayClick={false} closeOnEscape={canClose} footerContent={footer} onClose={close} onConfirm={confirm}>+ <FormModal isOpen={isOpen} title={sharingText.invitePeople} maxWidth="xl" closeOnOverlayClick={false} closeOnEscape={canClose} footerContent={footer} onClose={close} onConfirm={confirm}>{/* Progress through the three steps. */}<div className="mb-5"><div className="flex gap-2" aria-hidden="true">@@ -180,18 +180,18 @@ const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownFami<div key={index} className={`h-1.5 flex-1 rounded-full ${index < step ? 'bg-primary-500' : 'bg-gray-200 dark:bg-gray-700'}`} />))}</div>- <p className="mt-2 text-xs text-gray-500 dark:text-gray-400">{familySharingText.wizardStep(step, STEP_COUNT)}</p>+ <p className="mt-2 text-xs text-gray-500 dark:text-gray-400">{sharingText.wizardStep(step, STEP_COUNT)}</p></div>- {/* While a step works (looking the code up, or sharing the folder and sending the invitation) its content makes way for a spinner. */}- {isBusy && <InlineSpinner text={step === 2 && sharesFolder ? familySharingText.wizardCreating : t('common.loading')} />}+ {/* While a step works (looking the fingerprint up, or sharing the folder and sending the invitation) its content makes way for a spinner. */}+ {isBusy && <InlineSpinner text={step === 2 && sharesFolder ? sharingText.wizardCreating : t('common.loading')} />}{step === 1 && !isBusy && (<div className="space-y-5">- {/* Somebody verified before needs no code; picking them and entering a code exclude each other. */}+ {/* Somebody verified before needs no fingerprint; picking them and entering one exclude each other. */}{people.length > 0 && (<div className="space-y-2">- <h4 className="text-base font-medium text-gray-900 dark:text-white">{familySharingText.inviteWizardChooseTitle}</h4>+ <h4 className="text-base font-medium text-gray-900 dark:text-white">{sharingText.inviteWizardChooseTitle}</h4><ul className="space-y-2">{people.map(person => {const isSelected = selected?.userId === person.userId;@@ -219,16 +219,16 @@ const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownFami)}<div className="space-y-3">- <h4 className="text-base font-medium text-gray-900 dark:text-white">{people.length > 0 ? familySharingText.inviteWizardNewCodeTitle : familySharingText.inviteWizardCodeTitle}</h4>- <p className="text-sm text-gray-500 dark:text-gray-400">{familySharingText.inviteWizardCodeHint}</p>+ <h4 className="text-base font-medium text-gray-900 dark:text-white">{people.length > 0 ? sharingText.inviteWizardNewFingerprintTitle : sharingText.inviteWizardFingerprintTitle}</h4>+ <p className="text-sm text-gray-500 dark:text-gray-400">{sharingText.inviteWizardFingerprintHint}</p><InputTextField- id="invite-wizard-code"+ id="invite-wizard-fingerprint"value={code}onValueChange={value => {setCode(value);setSelected(null);}}- placeholder={familySharingText.codePlaceholder}+ placeholder={sharingText.fingerprintPlaceholder}autoFocus={people.length === 0}/></div>@@ -237,8 +237,8 @@ const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownFami{step === 2 && account && !isBusy && (<div className="space-y-3">- <h4 className="text-base font-medium text-gray-900 dark:text-white">{familySharingText.inviteWizardConfirmTitle}</h4>- <p className="text-sm text-gray-600 dark:text-gray-300">{emphasized(sharesFolder ? familySharingText.inviteWizardConfirmShare(account.username, folderName) : familySharingText.inviteWizardConfirmFolder(account.username, folderName), account.username)}</p>+ <h4 className="text-base font-medium text-gray-900 dark:text-white">{sharingText.inviteWizardConfirmTitle}</h4>+ <p className="text-sm text-gray-600 dark:text-gray-300">{emphasized(sharesFolder ? sharingText.inviteWizardConfirmShare(account.username, folderName) : sharingText.inviteWizardConfirmFolder(account.username, folderName), account.username)}</p></div>)}@@ -246,14 +246,14 @@ const InviteMemberWizard: React.FC<InviteMemberWizardProps> = ({ isOpen, ownFami<div className="space-y-4"><div className="flex items-center gap-2"><Icon name="check-circle" className="w-6 h-6 shrink-0 text-green-500" />- <h4 className="text-base font-medium text-gray-900 dark:text-white">{emphasized(familySharingText.inviteWizardInvited(account.username), account.username)}</h4>+ <h4 className="text-base font-medium text-gray-900 dark:text-white">{emphasized(sharingText.inviteWizardInvited(account.username), account.username)}</h4></div>- {/* What the admin still has to do: the invitee types this code to accept. */}+ {/* What the admin still has to do: the invitee types this fingerprint to accept. */}<div className="space-y-3 rounded-lg border border-gray-200 p-4 dark:border-gray-700">- <h5 className="text-sm font-semibold text-gray-900 dark:text-white">{familySharingText.inviteWizardNextStep}</h5>- <p className="text-sm text-gray-600 dark:text-gray-300">{emphasized(familySharingText.inviteWizardShareHint(account.username), account.username)}</p>- {ownFamilyCode && <FamilyCode code={ownFamilyCode} />}- <p className="text-xs text-gray-500 dark:text-gray-400">{familySharingText.inviteWizardShareNotSecret}</p>+ <h5 className="text-sm font-semibold text-gray-900 dark:text-white">{sharingText.inviteWizardNextStep}</h5>+ <p className="text-sm text-gray-600 dark:text-gray-300">{emphasized(sharingText.inviteWizardShareHint(account.username), account.username)}</p>+ {ownFingerprint && <AccountFingerprint code={ownFingerprint} />}+ <p className="text-xs text-gray-500 dark:text-gray-400">{sharingText.inviteWizardShareNotSecret}</p></div></div>)}diff --git a/apps/web/src/components/settings/SettingsIcon.tsx b/apps/web/src/components/settings/SettingsIcon.tsxindex 78dc167d6..c03b61116 100644--- a/apps/web/src/components/settings/SettingsIcon.tsx+++ b/apps/web/src/components/settings/SettingsIcon.tsx@@ -7,7 +7,7 @@ import type { UiIconName } from '@aliasvault/models/icons';/*** The icons of the settings pages, shared by the settings overview rows and the page headers.*/-export type SettingsIconName = 'twoFactor' | 'security' | 'changePassword' | 'vaultUnlock' | 'clipboard' | 'deleteAccount' | 'sessions' | 'passwordGenerator' | 'identityGenerator' | 'importExport' | 'storage' | 'general' | 'apps' | 'themeLight' | 'themeDark' | 'lock' | 'securityWarning' | 'logout' | 'warning' | 'vault' | 'emails' | 'familySharing';+export type SettingsIconName = 'twoFactor' | 'security' | 'changePassword' | 'vaultUnlock' | 'clipboard' | 'deleteAccount' | 'sessions' | 'passwordGenerator' | 'identityGenerator' | 'importExport' | 'storage' | 'general' | 'apps' | 'themeLight' | 'themeDark' | 'lock' | 'securityWarning' | 'logout' | 'warning' | 'vault' | 'emails' | 'sharing';/** The catalog icon of each settings icon. */const SETTINGS_ICONS: Record<SettingsIconName, UiIconName> = {@@ -32,7 +32,7 @@ const SETTINGS_ICONS: Record<SettingsIconName, UiIconName> = {vault: 'archive',emails: 'mail',lock: 'lock-closed',- familySharing: 'user-group',+ sharing: 'user-group',};/**diff --git a/apps/web/src/components/sharing/SharedFolderAccessModal.tsx b/apps/web/src/components/sharing/SharedFolderAccessModal.tsxindex 334e6244c..4404351a8 100644--- a/apps/web/src/components/sharing/SharedFolderAccessModal.tsx+++ b/apps/web/src/components/sharing/SharedFolderAccessModal.tsx@@ -1,12 +1,12 @@-import { canAdministerGroup, describeMemberAccess, familySharingText, hasOtherPeople, holdsManifestKey, invitablePeople, memberKeyProblem, pendingInvitees, roleLabel, sharingView, type SharedFolder } from '@aliasvault/client/sharing/FamilySharingView';import { SharingService } from '@aliasvault/client/sharing/SharingService';+import { canAdministerGroup, describeMemberAccess, sharingText, hasOtherPeople, holdsManifestKey, invitablePeople, memberKeyProblem, pendingInvitees, roleLabel, sharingView, type SharedFolder } from '@aliasvault/client/sharing/SharingView';import React, { useEffect, useRef, useState } from 'react';import { useTranslation } from 'react-i18next';import AlertMessageError from '@/components/alerts/AlertMessageError';import AlertMessageSuccess from '@/components/alerts/AlertMessageSuccess';-import FamilyCode from '@/components/settings/FamilyCode';-import InviteMemberWizard, { type FamilyCodeAccount } from '@/components/settings/InviteMemberWizard';+import AccountFingerprint from '@/components/settings/AccountFingerprint';+import InviteMemberWizard, { type AccountLookupResult } from '@/components/settings/InviteMemberWizard';import Button from '@/components/shared/Button';import FormModal from '@/components/shared/FormModal';import Icon from '@/components/shared/Icon';@@ -38,7 +38,7 @@ type SharedFolderAccessModalProps = {};/**- * The people of a folder: who has access, inviting someone new by their code or somebody verified before, and taking+ * The people of a folder: who has access, inviting someone new by their account fingerprint or somebody verified before, and taking* access away. A personal folder becomes a shared folder on its first invitation.*/const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ isOpen, folder, isShared, shared, onMoved, onLeft, onClose }) => {@@ -99,18 +99,18 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ isOpe}if (isShared) {// A shared folder whose people have not loaded yet; never share it a second time.- throw new SharingOperationError(familySharingText.errors.inviteFailed);+ throw new SharingOperationError(sharingText.errors.inviteFailed);}const result = await vaultStore.createSharedManifest(folder.Name);- unwrapSharingResult(result, familySharingText.errors.createVaultFailed, t);+ unwrapSharingResult(result, sharingText.errors.createVaultFailed, t);const manifestId = (result.manifestId ?? '').toLowerCase();// The sync pushes the new shared folder; the contents then move into it with a push of their own.await syncVault();const client = await loadStoredDatabase();if (!client) {- throw new SharingOperationError(familySharingText.errors.createVaultFailed);+ throw new SharingOperationError(sharingText.errors.createVaultFailed);}await executeVaultMutationAsync(async () => {await client.folders.moveContentsToManifest({ Id: folder.Id, ManifestId: folder.ManifestId }, manifestId);@@ -118,7 +118,7 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ isOpeconst created = sharingView(await SharingService.getOverview(webApi)).folders.find(candidate => candidate.manifest.manifestId.toLowerCase() === manifestId) ?? null;if (!created) {- throw new SharingOperationError(familySharingText.errors.createVaultFailed);+ throw new SharingOperationError(sharingText.errors.createVaultFailed);}onMoved({ Id: manifestId, ManifestId: manifestId }, true);return created;@@ -131,46 +131,46 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ isOpeconst inviteKnown = async (userId: string): Promise<void> => {try {const target = await ensureShared();- unwrapSharingResult(await vaultStore.inviteToSharedManifest(target.group.groupId, target.manifest.manifestId, userId), familySharingText.errors.inviteFailed, t);+ unwrapSharingResult(await vaultStore.inviteToSharedManifest(target.group.groupId, target.manifest.manifestId, userId), sharingText.errors.inviteFailed, t);await loadStoredDatabase();- setInviteNotice(familySharingText.invitationSent(shared.verifiedPeople.find(person => person.userId === userId)?.username ?? ''));+ setInviteNotice(sharingText.invitationSent(shared.verifiedPeople.find(person => person.userId === userId)?.username ?? ''));} catch (inviteError) {- throw new Error(sharingFailureMessage(inviteError, familySharingText.errors.inviteFailed));+ throw new Error(sharingFailureMessage(inviteError, sharingText.errors.inviteFailed));} finally {await shared.reload();}};/**- * Find the account behind a code for the invite wizard, also before the folder is shared. Throws an error with the message to show.- * @param code - the code entered.+ * Find the account behind an account fingerprint for the invite wizard, also before the folder is shared. Throws an error with the message to show.+ * @param code - the account fingerprint entered.*/- const lookup = async (code: string): Promise<FamilyCodeAccount> => {+ const lookup = async (code: string): Promise<AccountLookupResult> => {try {- const result = await vaultStore.lookupIdentityCode(current?.group.groupId, code);- unwrapSharingResult(result, familySharingText.errors.inviteFailed, t);+ const result = await vaultStore.lookupAccountFingerprint(current?.group.groupId, code);+ unwrapSharingResult(result, sharingText.errors.inviteFailed, t);if (result.alreadyMember) {- throw new SharingOperationError(familySharingText.errors.alreadyHasAccess);+ throw new SharingOperationError(sharingText.errors.alreadyHasAccess);}return { username: result.username ?? '' };} catch (lookupError) {- throw new Error(sharingFailureMessage(lookupError, familySharingText.errors.inviteFailed));+ throw new Error(sharingFailureMessage(lookupError, sharingText.errors.inviteFailed));}};/**- * Invite the account behind a code, sharing a personal folder at this point, once the person is known and confirmed.- * The sync engine checks their key against the code and certifies it.- * @param code - the code entered.+ * Invite the account behind an account fingerprint, sharing a personal folder at this point, once the person is known and confirmed.+ * The sync engine checks their key against the fingerprint and certifies it.+ * @param code - the account fingerprint entered.*/- const inviteByCode = async (code: string): Promise<void> => {+ const inviteByFingerprint = async (code: string): Promise<void> => {try {const target = await ensureShared();- const result = await vaultStore.inviteToSharedManifestByCode(target.group.groupId, target.manifest.manifestId, code);- unwrapSharingResult(result, familySharingText.errors.inviteFailed, t);- setInviteNotice(familySharingText.invitationSent(result.username ?? ''));+ const result = await vaultStore.inviteToSharedManifestByFingerprint(target.group.groupId, target.manifest.manifestId, code);+ unwrapSharingResult(result, sharingText.errors.inviteFailed, t);+ setInviteNotice(sharingText.invitationSent(result.username ?? ''));} catch (inviteError) {- throw new Error(sharingFailureMessage(inviteError, familySharingText.errors.inviteFailed));+ throw new Error(sharingFailureMessage(inviteError, sharingText.errors.inviteFailed));} finally {await shared.reload();}@@ -198,16 +198,16 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ isOpe*/const removeAccess = async (target: SharedFolder, member: GroupMemberInfo, isSelf: boolean): Promise<void> => {const confirmed = isSelf- ? await showConfirmation(familySharingText.leaveVault, familySharingText.leaveVaultConfirm(folder.Name), familySharingText.leaveVault, t('common.cancel'))- : await showConfirmation(familySharingText.revoke, familySharingText.revokeAccessConfirm(member.username, folder.Name), familySharingText.revoke, t('common.cancel'));+ ? await showConfirmation(sharingText.leaveVault, sharingText.leaveVaultConfirm(folder.Name), sharingText.leaveVault, t('common.cancel'))+ : await showConfirmation(sharingText.revoke, sharingText.revokeAccessConfirm(member.username, folder.Name), sharingText.revoke, t('common.cancel'));if (!confirmed) {return;}askPassword({- title: isSelf ? familySharingText.leaveVault : familySharingText.revoke,- description: isSelf ? familySharingText.leaveVaultPasswordPrompt(folder.Name) : familySharingText.revokeAccessPasswordPrompt(member.username, folder.Name),- failureMessage: familySharingText.errors.revokeAccessFailed,+ title: isSelf ? sharingText.leaveVault : sharingText.revoke,+ description: isSelf ? sharingText.leaveVaultPasswordPrompt(folder.Name) : sharingText.revokeAccessPasswordPrompt(member.username, folder.Name),+ failureMessage: sharingText.errors.revokeAccessFailed,/*** Run the action with the password proof.* @param answerChallenge - answers the SRP challenge.@@ -228,7 +228,7 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ isOpe}await shared.reload();} catch (revertError) {- setError(sharingFailureMessage(revertError, familySharingText.errors.revokeAccessFailed));+ setError(sharingFailureMessage(revertError, sharingText.errors.revokeAccessFailed));} finally {setBusy(false);}@@ -276,7 +276,7 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ isOpereturn;}revertCheckedRef.current = emptyOwnedManifestId;- void run(() => revertIfEmpty(emptyOwnedManifestId), familySharingText.errors.revokeAccessFailed);+ void run(() => revertIfEmpty(emptyOwnedManifestId), sharingText.errors.revokeAccessFailed);// eslint-disable-next-line react-hooks/exhaustive-deps}, [emptyOwnedManifestId]);@@ -295,15 +295,15 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ isOpe{error && <AlertMessageError message={error} hasTopMargin={false} />}{notice && <AlertMessageSuccess message={notice} />}- {!isShared && <p className="text-sm text-gray-600 dark:text-gray-400">{familySharingText.shareFolderHint}</p>}+ {!isShared && <p className="text-sm text-gray-600 dark:text-gray-400">{sharingText.shareFolderHint}</p>}{/* The people with access, with a + to invite more; only listed once anybody besides this account is in. */}{current && hasOthers && (<div><div className="mb-2 flex items-center justify-between gap-2">- <h4 className="text-sm font-medium text-gray-900 dark:text-white">{familySharingText.peopleTitle}</h4>+ <h4 className="text-sm font-medium text-gray-900 dark:text-white">{sharingText.peopleTitle}</h4>{canInvite && hasOthers && (- <button id="invite-someone-new" disabled={busy} onClick={() => setIsInviteOpen(true)} title={familySharingText.invitePeople} aria-label={familySharingText.invitePeople} className="p-1.5 rounded-md text-primary-600 hover:bg-primary-50 dark:text-primary-400 dark:hover:bg-primary-900/30 disabled:opacity-50">+ <button id="invite-someone-new" disabled={busy} onClick={() => setIsInviteOpen(true)} title={sharingText.invitePeople} aria-label={sharingText.invitePeople} className="p-1.5 rounded-md text-primary-600 hover:bg-primary-50 dark:text-primary-400 dark:hover:bg-primary-900/30 disabled:opacity-50"><Icon name="plus" className="w-5 h-5" /></button>)}@@ -314,11 +314,11 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ isOpereturn (<li key={member.userId} className="flex items-center justify-between gap-2 py-2" data-person={member.username}><div className="min-w-0">- <p className="text-sm text-gray-900 dark:text-white truncate">{member.username}{access.isSelf && ` (${familySharingText.you})`}</p>+ <p className="text-sm text-gray-900 dark:text-white truncate">{member.username}{access.isSelf && ` (${sharingText.you})`}</p><p className="text-sm text-gray-500 dark:text-gray-400">{roleLabel(member)}</p></div>- {access.canLeave && <SmallButton color="danger" isDisabled={busy} onClick={() => void removeAccess(current, member, true)}>{familySharingText.leaveVault}</SmallButton>}- {access.canRevoke && <SmallButton color="danger" isDisabled={busy} onClick={() => void removeAccess(current, member, false)}>{familySharingText.revoke}</SmallButton>}+ {access.canLeave && <SmallButton color="danger" isDisabled={busy} onClick={() => void removeAccess(current, member, true)}>{sharingText.leaveVault}</SmallButton>}+ {access.canRevoke && <SmallButton color="danger" isDisabled={busy} onClick={() => void removeAccess(current, member, false)}>{sharingText.revoke}</SmallButton>}</li>);})}@@ -326,32 +326,32 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ isOpe<li key={invitation.id} className="flex items-center justify-between gap-2 py-2" data-person={invitation.inviteeUsername}><div className="min-w-0"><p className="text-sm text-gray-900 dark:text-white truncate">{invitation.inviteeUsername}</p>- <p className="text-sm text-gray-500 dark:text-gray-400">{familySharingText.invited}</p>+ <p className="text-sm text-gray-500 dark:text-gray-400">{sharingText.invited}</p></div><SmallButton isDisabled={busy} onClick={() => void run(async () => {await SharingService.withdrawInvitation(webApi, invitation.id);await revertIfEmpty(current.manifest.manifestId);- }, familySharingText.errors.invitationGone)}>{familySharingText.withdraw}</SmallButton>+ }, sharingText.errors.invitationGone)}>{sharingText.withdraw}</SmallButton></li>))}</ul></div>)}- {/* While an invitation waits, the code the invitee types to accept it is at hand here too. */}- {current && canAdministerGroup(current.group) && pendingInvitees(current).length > 0 && shared.ownCode && (+ {/* While an invitation waits, the fingerprint the invitee types to accept it is at hand here too. */}+ {current && canAdministerGroup(current.group) && pendingInvitees(current).length > 0 && shared.ownFingerprint && (<div className="space-y-1.5">- <p className="text-xs text-gray-500 dark:text-gray-400">{familySharingText.pendingCodeTip}</p>- <FamilyCode code={shared.ownCode} isSmall />+ <p className="text-xs text-gray-500 dark:text-gray-400">{sharingText.pendingFingerprintTip}</p>+ <AccountFingerprint code={shared.ownFingerprint} isSmall /></div>)}{/* Nobody else in yet (or still a personal folder): inviting is the one thing to do, so it is shown prominently. */}- {current && !hasOthers && <p className="text-sm text-gray-600 dark:text-gray-400">{familySharingText.notSharedYet}</p>}+ {current && !hasOthers && <p className="text-sm text-gray-600 dark:text-gray-400">{sharingText.notSharedYet}</p>}{canInvite && !hasOthers && (<div><Button id="invite-someone-new" isDisabled={busy} onClick={() => setIsInviteOpen(true)}>- <span className="inline-flex items-center gap-2"><Icon name="plus" className="w-4 h-4" />{familySharingText.invitePeople}</span>+ <span className="inline-flex items-center gap-2"><Icon name="plus" className="w-4 h-4" />{sharingText.invitePeople}</span></Button></div>)}@@ -362,9 +362,9 @@ const SharedFolderAccessModal: React.FC<SharedFolderAccessModalProps> = ({ isOpeisOpen={isInviteOpen}sharesFolder={!isShared}folderName={folder.Name}- ownFamilyCode={shared.ownCode}+ ownFingerprint={shared.ownFingerprint}onLookup={lookup}- onInvite={inviteByCode}+ onInvite={inviteByFingerprint}people={invitable.map(person => ({ userId: person.userId, username: person.username, problem: memberKeyProblem(person) }))}onInvitePerson={inviteKnown}onClose={() => {diff --git a/apps/web/src/components/sharing/SharedFolderInvitationModal.tsx b/apps/web/src/components/sharing/SharedFolderInvitationModal.tsxindex a160e0caf..fda0a8ccb 100644--- a/apps/web/src/components/sharing/SharedFolderInvitationModal.tsx+++ b/apps/web/src/components/sharing/SharedFolderInvitationModal.tsx@@ -1,5 +1,5 @@-import { familySharingText, isInviterVerified } from '@aliasvault/client/sharing/FamilySharingView';import { SharingService } from '@aliasvault/client/sharing/SharingService';+import { sharingText, isInviterVerified } from '@aliasvault/client/sharing/SharingView';import React, { useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -22,12 +22,12 @@ type SharedFolderInvitationModalProps = {/*** An invitation to a shared folder: accept or decline it. Accepting from an inviter this account has not verified yet- * first asks for their code.+ * first asks for their account fingerprint.*/const SharedFolderInvitationModal: React.FC<SharedFolderInvitationModalProps> = ({ invitation, folderName, onDone, onClose }) => {const { t } = useTranslation();const webApi = useWebApi();- const [askCode, setAskCode] = useState(false);+ const [askFingerprint, setAskCode] = useState(false);const [code, setCode] = useState('');const [error, setError] = useState<string | null>(null);const [busy, setBusy] = useState(false);@@ -43,28 +43,28 @@ const SharedFolderInvitationModal: React.FC<SharedFolderInvitationModalProps> =}/**- * Accept, with the inviter's code when it was asked for; an engine that holds no certification of the inviter asks for it.+ * Accept, with the inviter's account fingerprint when it was asked for; an engine that holds no certification of the inviter asks for it.*/const accept = async (): Promise<void> => {- if (!askCode && !isInviterVerified(invitation)) {+ if (!askFingerprint && !isInviterVerified(invitation)) {setAskCode(true);return;}- if (askCode && code.trim().length === 0) {+ if (askFingerprint && code.trim().length === 0) {return;}setBusy(true);setError(null);try {- const result = await vaultStore.acceptSharedManifestInvitation(invitation.id, askCode ? code.trim() : undefined);+ const result = await vaultStore.acceptSharedManifestInvitation(invitation.id, askFingerprint ? code.trim() : undefined);if (result.apiErrorCode === 'INVITER_NOT_VERIFIED') {setAskCode(true);}- unwrapSharingResult(result, familySharingText.errors.invitationGone, t);+ unwrapSharingResult(result, sharingText.errors.invitationGone, t);await onDone(true);} catch (acceptError) {- setError(sharingFailureMessage(acceptError, familySharingText.errors.invitationGone));+ setError(sharingFailureMessage(acceptError, sharingText.errors.invitationGone));} finally {setBusy(false);}@@ -80,7 +80,7 @@ const SharedFolderInvitationModal: React.FC<SharedFolderInvitationModalProps> =await SharingService.declineInvitation(webApi, invitation.id);await onDone(false);} catch (declineError) {- setError(sharingFailureMessage(declineError, familySharingText.errors.invitationGone));+ setError(sharingFailureMessage(declineError, sharingText.errors.invitationGone));} finally {setBusy(false);}@@ -88,31 +88,31 @@ const SharedFolderInvitationModal: React.FC<SharedFolderInvitationModalProps> =const footer = (<>- <Button id="accept-invitation" isDisabled={busy || (askCode && code.trim().length === 0)} onClick={() => void accept()}>{familySharingText.accept}</Button>- {!askCode && <Button color="secondary" isDisabled={busy} onClick={() => void decline()}>{familySharingText.decline}</Button>}- {askCode && <Button color="secondary" isDisabled={busy} onClick={() => setAskCode(false)}>{t('common.back')}</Button>}+ <Button id="accept-invitation" isDisabled={busy || (askFingerprint && code.trim().length === 0)} onClick={() => void accept()}>{sharingText.accept}</Button>+ {!askFingerprint && <Button color="secondary" isDisabled={busy} onClick={() => void decline()}>{sharingText.decline}</Button>}+ {askFingerprint && <Button color="secondary" isDisabled={busy} onClick={() => setAskCode(false)}>{t('common.back')}</Button>}</>);return (<FormModalisOpen- title={askCode ? familySharingText.inviterCodeTitle(invitation.inviterUsername) : familySharingText.sharedWithYou(invitation.inviterUsername, folderName)}+ title={askFingerprint ? sharingText.inviterFingerprintTitle(invitation.inviterUsername) : sharingText.sharedWithYou(invitation.inviterUsername, folderName)}footerContent={footer}onClose={onClose}onConfirm={() => void accept()}><div className="space-y-3">- {!askCode && (+ {!askFingerprint && (<>- <p className="text-sm text-gray-600 dark:text-gray-300">{familySharingText.sharedWithYouHint}</p>- <p className="text-sm text-gray-500 dark:text-gray-400">{isInviterVerified(invitation) ? familySharingText.invitedByVerified(invitation.inviterUsername) : familySharingText.invitedBy(invitation.inviterUsername)}</p>+ <p className="text-sm text-gray-600 dark:text-gray-300">{sharingText.sharedWithYouHint}</p>+ <p className="text-sm text-gray-500 dark:text-gray-400">{isInviterVerified(invitation) ? sharingText.invitedByVerified(invitation.inviterUsername) : sharingText.invitedBy(invitation.inviterUsername)}</p></>)}- {askCode && (+ {askFingerprint && (<>- <p className="text-sm text-gray-600 dark:text-gray-300">{familySharingText.inviterCodeExplanation(invitation.inviterUsername)}</p>- <InputTextField id="inviter-code" value={code} onValueChange={setCode} placeholder={familySharingText.codePlaceholder} autoFocus />+ <p className="text-sm text-gray-600 dark:text-gray-300">{sharingText.inviterFingerprintExplanation(invitation.inviterUsername)}</p>+ <InputTextField id="inviter-fingerprint" value={code} onValueChange={setCode} placeholder={sharingText.fingerprintPlaceholder} autoFocus /></>)}{error && <AlertMessageError message={error} hasTopMargin={false} />}diff --git a/apps/web/src/hooks/useSharedFolders.ts b/apps/web/src/hooks/useSharedFolders.tsindex df154c00b..0e358cc91 100644--- a/apps/web/src/hooks/useSharedFolders.ts+++ b/apps/web/src/hooks/useSharedFolders.ts@@ -1,5 +1,5 @@-import { sharingView, type SharedFolder } from '@aliasvault/client/sharing/FamilySharingView';import { SharingService } from '@aliasvault/client/sharing/SharingService';+import { sharingView, type SharedFolder } from '@aliasvault/client/sharing/SharingView';import { CapabilityKeys } from '@aliasvault/models/webapi';import { useCallback, useEffect, useState } from 'react';@@ -10,7 +10,7 @@ import type { GroupMemberInfo, ReceivedManifestInvitation } from '@aliasvault/mo/*** What the vault shows of sharing: the shared folders with their people, the invitations waiting for an answer, the- * people verified before and this account's own code.+ * people verified before and this account's own fingerprint.*/export type SharedFolders = {isEnabled: boolean;@@ -19,7 +19,7 @@ export type SharedFolders = {invitations: ReceivedManifestInvitation[];invitationNames: Record<string, string>;verifiedPeople: GroupMemberInfo[];- ownCode: string | null;+ ownFingerprint: string | null;reload: () => Promise<void>;};@@ -32,7 +32,7 @@ export function useSharedFolders(): SharedFolders {const isEnabled = useCapabilities()(CapabilityKeys.VaultSharing);const [view, setView] = useState<ReturnType<typeof sharingView>>(sharingView(null));const [invitationNames, setInvitationNames] = useState<Record<string, string>>({});- const [ownCode, setOwnCode] = useState<string | null>(null);+ const [ownFingerprint, setOwnFingerprint] = useState<string | null>(null);const reload = useCallback(async (): Promise<void> => {if (!isEnabled) {@@ -42,7 +42,7 @@ export function useSharedFolders(): SharedFolders {const overview = await SharingService.getOverview(webApi);setView(sharingView(overview));setInvitationNames(await SharingService.openInvitationNames(overview.receivedInvitations));- setOwnCode(await SharingService.ownIdentityCode());+ setOwnFingerprint(await SharingService.ownAccountFingerprint());} catch {// Offline or not reachable: the vault keeps showing what it already knew.}@@ -53,5 +53,5 @@ export function useSharedFolders(): SharedFolders {return SharingService.watchPendingInvitationCount(() => void reload());}, [reload]);- return { isEnabled, ...view, invitationNames, ownCode, reload };+ return { isEnabled, ...view, invitationNames, ownFingerprint, reload };}diff --git a/apps/web/src/pages/items/Home.tsx b/apps/web/src/pages/items/Home.tsxindex e2ff5bd20..c1b8bf6e4 100644--- a/apps/web/src/pages/items/Home.tsx+++ b/apps/web/src/pages/items/Home.tsx@@ -2,9 +2,9 @@ import { scopedKey } from '@aliasvault/client/database/ItemRef';import { CredentialSortOrder } from '@aliasvault/client/database/repositories/SettingsRepository';import { canHaveSubfolders, getDescendantFolderIds, getFolderPath, isItemInFolder, isSharedFolder } from '@aliasvault/client/items/FolderUtils';import { ItemFilter, applyTypeFilter, type ItemFilterType, parseItemFilterType } from '@aliasvault/client/items/ItemFilters';-import { canAdministerGroup, familySharingText, holdsManifestKey } from '@aliasvault/client/sharing/FamilySharingView';import { multiManifestRendering } from '@aliasvault/client/sharing/MultiManifestRendering';import { SharingService } from '@aliasvault/client/sharing/SharingService';+import { canAdministerGroup, sharingText, holdsManifestKey } from '@aliasvault/client/sharing/SharingView';import { ItemTypes, type Item, type ItemType } from '@aliasvault/models/vault';import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -447,14 +447,14 @@ const ItemsHome: React.FC = () => {* Delete the current shared folder for everyone, after a confirmation and the master password.*/const deleteSharedFolder = async (): Promise<void> => {- if (!currentShared || !await showConfirmation(familySharingText.deleteVault, familySharingText.deleteVaultConfirm(currentFolderName), t('common.delete'), t('common.cancel'))) {+ if (!currentShared || !await showConfirmation(sharingText.deleteVault, sharingText.deleteVaultConfirm(currentFolderName), t('common.delete'), t('common.cancel'))) {return;}askPassword({- title: familySharingText.deleteVault,- description: familySharingText.deleteVaultPasswordPrompt(currentFolderName),- failureMessage: familySharingText.errors.deleteVaultFailed,+ title: sharingText.deleteVault,+ description: sharingText.deleteVaultPasswordPrompt(currentFolderName),+ failureMessage: sharingText.errors.deleteVaultFailed,/*** Run the deletion with the password proof.* @param answerChallenge - answers the SRP challenge.@@ -467,7 +467,7 @@ const ItemsHome: React.FC = () => {await syncVault();await dbContext.loadStoredDatabase();await shared.reload();- notifications.addSuccessMessage(familySharingText.vaultDeleted);+ notifications.addSuccessMessage(sharingText.vaultDeleted);navigate(buildItemsUrl(null, filterType));},});@@ -563,7 +563,7 @@ const ItemsHome: React.FC = () => {titleActions={isInFolder ? (<>{canShareCurrent && (- <button id="folder-people" onClick={() => setPeopleFolder({ folder: currentFolder, isShared: currentFolderIsVirtual })} title={familySharingText.peopleTitle} className="p-1.5 text-gray-400 hover:text-primary-500 dark:text-gray-500 dark:hover:text-primary-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors">+ <button id="folder-people" onClick={() => setPeopleFolder({ folder: currentFolder, isShared: currentFolderIsVirtual })} title={sharingText.peopleTitle} className="p-1.5 text-gray-400 hover:text-primary-500 dark:text-gray-500 dark:hover:text-primary-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"><Icon name="users" className="w-5 h-5" /></button>)}@@ -647,8 +647,8 @@ const ItemsHome: React.FC = () => {className="inline-flex items-center gap-2 px-5 py-2.5 text-sm rounded-lg border border-dashed border-primary-400 bg-primary-50/50 text-gray-500 hover:bg-primary-50 dark:border-primary-600 dark:bg-primary-900/10 dark:text-gray-400 dark:hover:bg-primary-900/20 transition-colors"><Icon name="mail" className="w-4 h-4 text-primary-500" />- <span className="truncate max-w-[150px]">{shared.invitationNames[invitation.id] ?? familySharingText.sharedVault}</span>- <span className="text-xs text-primary-600 dark:text-primary-400">{familySharingText.invitationPending}</span>+ <span className="truncate max-w-[150px]">{shared.invitationNames[invitation.id] ?? sharingText.sharedVault}</span>+ <span className="text-xs text-primary-600 dark:text-primary-400">{sharingText.invitationPending}</span></button>))}{canCreateSubfolder && (@@ -731,7 +731,7 @@ const ItemsHome: React.FC = () => {return (<SharedFolderInvitationModalinvitation={invitation}- folderName={invitation ? shared.invitationNames[invitation.id] ?? familySharingText.sharedVault : ''}+ folderName={invitation ? shared.invitationNames[invitation.id] ?? sharingText.sharedVault : ''}onDone={accepted => (invitation ? finishInvitation(invitation.id, invitation.manifestId, accepted) : Promise.resolve())}onClose={() => setOpenInvitationId(null)}/>diff --git a/apps/web/src/pages/settings/Settings.tsx b/apps/web/src/pages/settings/Settings.tsxindex 4977fc1ee..dc596d822 100644--- a/apps/web/src/pages/settings/Settings.tsx+++ b/apps/web/src/pages/settings/Settings.tsx@@ -1,11 +1,11 @@-import { familySharingText } from '@aliasvault/client/sharing/FamilySharingView';import { SharingService } from '@aliasvault/client/sharing/SharingService';+import { sharingText } from '@aliasvault/client/sharing/SharingView';import { CapabilityKeys } from '@aliasvault/models/webapi';import React, { useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';import { Link } from 'react-router-dom';-import FamilyCode from '@/components/settings/FamilyCode';+import AccountFingerprint from '@/components/settings/AccountFingerprint';import SettingsIcon, { type SettingsIconName } from '@/components/settings/SettingsIcon';import PageContent from '@/components/shared/PageContent';import PageHeader from '@/components/shared/PageHeader';@@ -75,10 +75,10 @@ const Settings: React.FC = () => {const { t } = useTranslation();const { username } = useAuth();const hasCapability = useCapabilities();- const [ownSharingCode, setOwnSharingCode] = useState<string | null>(null);+ const [ownFingerprint, setOwnFingerprint] = useState<string | null>(null);useEffect(() => {- void SharingService.ownIdentityCode().then(setOwnSharingCode);+ void SharingService.ownAccountFingerprint().then(setOwnFingerprint);}, []);const confirmLogout = useConfirmLogout();const { reminders } = useAccountReminders();@@ -147,11 +147,11 @@ const Settings: React.FC = () => {</button></div></section>- {/* The code someone who shares a folder with this account needs to invite it. */}- {hasCapability(CapabilityKeys.VaultSharing) && ownSharingCode && (+ {/* The account fingerprint someone who shares a folder with this account needs to invite it. */}+ {hasCapability(CapabilityKeys.VaultSharing) && ownFingerprint && (<section className="flex flex-col gap-2 p-4 bg-white border border-gray-200 rounded-lg shadow-sm dark:border-gray-700 dark:bg-gray-800">- <FamilyCode id="own-identity-code" code={ownSharingCode} className="self-start" />- <p className="text-sm text-gray-500 dark:text-gray-400">{familySharingText.yourCodeSettingsHint}</p>+ <AccountFingerprint id="own-account-fingerprint" code={ownFingerprint} className="self-start" />+ <p className="text-sm text-gray-500 dark:text-gray-400">{sharingText.yourFingerprintSettingsHint}</p></section>)}<div className="grid grid-cols-1 md:grid-cols-2 md:grid-rows-[auto_1fr] gap-4 items-start">diff --git a/apps/web/src/utils/SharingErrors.ts b/apps/web/src/utils/SharingErrors.tsindex 25f981b08..6e3e0816b 100644--- a/apps/web/src/utils/SharingErrors.ts+++ b/apps/web/src/utils/SharingErrors.ts@@ -1,6 +1,6 @@import { apiErrorCodeOf } from '@aliasvault/client/api/errors/ApiRequestError';import { AppErrorCode, formatErrorWithCode } from '@aliasvault/client/api/errors/AppErrorCodes';-import { familySharingText, sharingErrorMessage } from '@aliasvault/client/sharing/FamilySharingView';+import { sharingText, sharingErrorMessage } from '@aliasvault/client/sharing/SharingView';import type { SharingOperationResult } from '@aliasvault/client/sync/VaultSync';import type { TFunction } from 'i18next';@@ -36,7 +36,7 @@ export function unwrapSharingResult(result: SharingOperationResult, fallback: st}if (result.vaultUpgradeRequired) {- throw new SharingOperationError(familySharingText.errors.vaultUpgradeRequired);+ throw new SharingOperationError(sharingText.errors.vaultUpgradeRequired);}if (result.errorCode === AppErrorCode.VAULT_LOCKED) {diff --git a/apps/web/src/vault/VaultStore.ts b/apps/web/src/vault/VaultStore.tsindex 1e8d191c7..d9a0c955b 100644--- a/apps/web/src/vault/VaultStore.ts+++ b/apps/web/src/vault/VaultStore.ts@@ -517,31 +517,31 @@ export const vaultStore = {},/**- * Invite the account behind an identity code to a shared manifest, certifying its key first.+ * Invite the account behind an account fingerprint to a shared manifest, certifying its key first.* @param groupId - the group* @param manifestId - the shared manifest- * @param identityCode - the identity code the other person gave outside AliasVault+ * @param accountFingerprint - the account fingerprint the other person gave outside AliasVault*/- inviteToSharedManifestByCode(groupId: string, manifestId: string, identityCode: string): Promise<SharingOperationResult> {- return vaultSync.inviteToSharedManifestByCode(groupId, manifestId, identityCode);+ inviteToSharedManifestByFingerprint(groupId: string, manifestId: string, accountFingerprint: string): Promise<SharingOperationResult> {+ return vaultSync.inviteToSharedManifestByFingerprint(groupId, manifestId, accountFingerprint);},/**- * Find the account behind an identity code and check the code against its key, without inviting it.+ * Find the account behind an account fingerprint and check the fingerprint against its key, without inviting it.* @param groupId - the group of the shared folder the person is invited to, if it is shared already- * @param identityCode - the identity code the other person gave outside AliasVault+ * @param accountFingerprint - the account fingerprint the other person gave outside AliasVault*/- lookupIdentityCode(groupId: string | undefined, identityCode: string): Promise<SharingOperationResult> {- return vaultSync.lookupIdentityCode(groupId, identityCode);+ lookupAccountFingerprint(groupId: string | undefined, accountFingerprint: string): Promise<SharingOperationResult> {+ return vaultSync.lookupAccountFingerprint(groupId, accountFingerprint);},/*** Accept an invitation to a shared manifest, signing its grant as this account's own.* @param invitationId - the invitation- * @param identityCode - the inviter's identity code, when they are not certified yet+ * @param accountFingerprint - the inviter's account fingerprint, when they are not certified yet*/- acceptSharedManifestInvitation(invitationId: string, identityCode?: string): Promise<SharingOperationResult> {- return vaultSync.acceptSharedManifestInvitation(invitationId, identityCode);+ acceptSharedManifestInvitation(invitationId: string, accountFingerprint?: string): Promise<SharingOperationResult> {+ return vaultSync.acceptSharedManifestInvitation(invitationId, accountFingerprint);},/**diff --git a/apps/web/tests/e2e/70-sharing.spec.ts b/apps/web/tests/e2e/70-sharing.spec.tsindex f992f8aaf..bc1e09391 100644--- a/apps/web/tests/e2e/70-sharing.spec.ts+++ b/apps/web/tests/e2e/70-sharing.spec.ts@@ -7,11 +7,11 @@ import { createTestUser, enableCapability } from '../helpers/test-api';import type { WebApp } from '../fixtures/WebApp';/**- * The viewer's own identity code, shown on the settings overview.+ * The viewer's own account fingerprint, shown on the settings overview.*/-async function ownIdentityCode(app: WebApp): Promise<string> {+async function ownAccountFingerprint(app: WebApp): Promise<string> {await app.openSettings();- const code = (await app.page.locator('#own-identity-code').innerText()).trim();+ const code = (await app.page.locator('#own-account-fingerprint').innerText()).trim();expect(code).toMatch(/^\d{4}-\d{4}-\d{4}-\d{4}-\d{4}$/);return code;}@@ -56,31 +56,31 @@ test.describe('70. Sharing', () => {await expect(owner.page.getByText(itemName, { exact: true })).toBeVisible();});- let memberCode = '';+ let memberFingerprint = '';await test.step('inviting from the folder\'s people dialog shares it first; a wrong code and the own code are refused', async () => {- memberCode = await ownIdentityCode(member);- const ownerCode = await ownIdentityCode(owner);+ memberFingerprint = await ownAccountFingerprint(member);+ const ownerFingerprint = await ownAccountFingerprint(owner);await owner.openFolder(folderName);await owner.page.locator('#folder-people').click();await expect(owner.page.getByText('Invite people to share this folder with them.', { exact: false })).toBeVisible();// The folder stays personal until the first invitation goes out; the wizard asks for the code first.await owner.page.locator('#invite-someone-new').click();- const wrongCode = `${memberCode.slice(0, -1)}${memberCode.endsWith('0') ? '1' : '0'}`;- await owner.page.locator('#invite-wizard-code').fill(wrongCode);+ const wrongCode = `${memberFingerprint.slice(0, -1)}${memberFingerprint.endsWith('0') ? '1' : '0'}`;+ await owner.page.locator('#invite-wizard-fingerprint').fill(wrongCode);await owner.page.locator('#invite-wizard-next').click();- await expect(owner.page.getByText('No account has this code.', { exact: false })).toBeVisible();- await owner.page.locator('#invite-wizard-code').fill(ownerCode);+ await expect(owner.page.getByText('No account has this account fingerprint.', { exact: false })).toBeVisible();+ await owner.page.locator('#invite-wizard-fingerprint').fill(ownerFingerprint);await owner.page.locator('#invite-wizard-next').click();- await expect(owner.page.getByText('This is your own code.', { exact: false })).toBeVisible();+ await expect(owner.page.getByText('This is your own account fingerprint.', { exact: false })).toBeVisible();await owner.pause();});- await test.step('the owner invites the member with their identity code', async () => {- await owner.page.locator('#invite-wizard-code').fill(memberCode);+ await test.step('the owner invites the member with their account fingerprint', async () => {+ await owner.page.locator('#invite-wizard-fingerprint').fill(memberFingerprint);await owner.page.locator('#invite-wizard-next').click();await expect(owner.page.getByText(`You are about to share “${folderName}” with ${memberUser.username}.`, { exact: false })).toBeVisible();await owner.page.locator('#invite-wizard-confirm').click();- await expect(owner.page.getByText('Next step: share your code')).toBeVisible();+ await expect(owner.page.getByText('Next step: share your account fingerprint')).toBeVisible();await expect(owner.page.locator('#invite-wizard-close')).toBeEnabled({ timeout: 5000 });await owner.page.locator('#invite-wizard-close').click();await expect(owner.page.locator(`[data-person="${memberUser.username}"]`)).toContainText('Invited');@@ -90,7 +90,7 @@ test.describe('70. Sharing', () => {});await test.step('the member sees the invitation in their folder list and accepts it with the owner\'s code', async () => {- const ownerCode = await ownIdentityCode(owner);+ const ownerFingerprint = await ownAccountFingerprint(owner);await member.openVault();await expect(async () => {await member.page.getByRole('button', { name: 'Refresh' }).click();@@ -100,11 +100,11 @@ test.describe('70. Sharing', () => {await expect(member.page.getByText(`${ownerUser.username} shared “${folderName}” with you`)).toBeVisible();await member.page.locator('#accept-invitation').click();await expect(member.page.getByText(`Confirm the invitation from ${ownerUser.username}`)).toBeVisible();- const wrongCode = `${ownerCode.slice(0, -1)}${ownerCode.endsWith('0') ? '1' : '0'}`;- await member.page.locator('#inviter-code').fill(wrongCode);+ const wrongCode = `${ownerFingerprint.slice(0, -1)}${ownerFingerprint.endsWith('0') ? '1' : '0'}`;+ await member.page.locator('#inviter-fingerprint').fill(wrongCode);await member.page.locator('#accept-invitation').click();- await expect(member.page.getByText('This code is not correct.', { exact: false })).toBeVisible();- await member.page.locator('#inviter-code').fill(ownerCode);+ await expect(member.page.getByText('This account fingerprint is not correct.', { exact: false })).toBeVisible();+ await member.page.locator('#inviter-fingerprint').fill(ownerFingerprint);await member.page.locator('#accept-invitation').click();await expect(member.page).toHaveURL(/\/items\/folder\//);await expect(member.page.getByText(itemName, { exact: true })).toBeVisible();@@ -152,7 +152,7 @@ test.describe('70. Sharing', () => {await expect(member.page.getByText(`Invited by ${ownerUser.username} (verified)`)).toBeVisible();await member.page.locator('#accept-invitation').click();await expect(member.page).toHaveURL(/\/items\/folder\//);- await expect(member.page.locator('#inviter-code')).toHaveCount(0);+ await expect(member.page.locator('#inviter-fingerprint')).toHaveCount(0);await member.pause();});diff --git a/core/client/src/email/AliasOwner.ts b/core/client/src/email/AliasOwner.tsindex 2b6d59fcb..293a474e4 100644--- a/core/client/src/email/AliasOwner.ts+++ b/core/client/src/email/AliasOwner.ts@@ -1,4 +1,4 @@-import { familySharingText } from '../sharing/FamilySharingView';+import { sharingText } from '../sharing/SharingView';import type { Folder } from '../database/repositories/FolderRepository';import type { EmailClaimTransferRequest, Mailbox } from '@aliasvault/models/webapi';@@ -29,7 +29,7 @@ type PostApi = {*/function sharedFolderName(folders: Pick<Folder, 'Id' | 'ManifestId' | 'Name'>[], manifestId: string): string {const id = manifestId.toLowerCase();- return folders.find(f => f.Id.toLowerCase() === id && f.ManifestId.toLowerCase() === id)?.Name ?? familySharingText.sharedVault;+ return folders.find(f => f.Id.toLowerCase() === id && f.ManifestId.toLowerCase() === id)?.Name ?? sharingText.sharedVault;}/**@@ -52,7 +52,7 @@ export function aliasOwnerNotice(return null;}- const text = familySharingText.aliasOwner;+ const text = sharingText.aliasOwner;/*** Whether the manifest is the user's personal one.*/@@ -70,7 +70,7 @@ export function aliasOwnerNotice(*/export function aliasOwnerErrorText(code: string | null | undefined): string | null {switch (code) {- case 'CLAIM_OWNED_BY_OTHER_VAULT': return familySharingText.errors.aliasOwnedByOtherFolder;+ case 'CLAIM_OWNED_BY_OTHER_VAULT': return sharingText.errors.aliasOwnedByOtherFolder;default: return null;}}diff --git a/core/client/src/sharing/MultiManifestRendering.ts b/core/client/src/sharing/MultiManifestRendering.tsindex e01f50836..ab74cb4e3 100644--- a/core/client/src/sharing/MultiManifestRendering.ts+++ b/core/client/src/sharing/MultiManifestRendering.ts@@ -1,4 +1,4 @@-import { familySharingText } from './FamilySharingView';+import { sharingText } from './SharingView';import type { Folder } from '../database/repositories/FolderRepository';import type { SqliteClient } from '../database/SqliteClient';@@ -107,7 +107,7 @@ const subfolderRendering: MultiManifestRenderer = {const roots = sharedManifests.filter(manifest => !storedRoots.has(manifest.ManifestId.toLowerCase()))- .map(manifest => ({ Id: manifest.ManifestId.toLowerCase(), Name: manifest.Name || familySharingText.sharedVault, ParentFolderId: null, Weight: 0, ManifestId: manifest.ManifestId }));+ .map(manifest => ({ Id: manifest.ManifestId.toLowerCase(), Name: manifest.Name || sharingText.sharedVault, ParentFolderId: null, Weight: 0, ManifestId: manifest.ManifestId }));const nested = stored.map(folder => (folder.ParentFolderId === null && shared.has(String(folder.ManifestId).toLowerCase()) && !subfolderRendering.isVirtualFolder(folder)? { ...folder, ParentFolderId: String(folder.ManifestId).toLowerCase() }@@ -150,7 +150,7 @@ const subfolderRendering: MultiManifestRenderer = {// A manifest whose name is not known (yet) shows under a generic name.const rows = sqliteClient.executeQuery<{ Id: string; Name: string | null }>('SELECT Id, Name FROM Manifests');- return Object.fromEntries(rows.map(row => [row.Id.toLowerCase(), row.Name || familySharingText.sharedVault]));+ return Object.fromEntries(rows.map(row => [row.Id.toLowerCase(), row.Name || sharingText.sharedVault]));},};diff --git a/core/client/src/sharing/SharingService.ts b/core/client/src/sharing/SharingService.tsindex 1d5ed16a2..20f624dcb 100644--- a/core/client/src/sharing/SharingService.ts+++ b/core/client/src/sharing/SharingService.ts@@ -43,9 +43,9 @@ export class SharingService {}/**- * This account's own identity code, derived from its signing private key; null while the vault is locked or the account has no signing key yet.+ * This account's own account fingerprint, derived from its signing private key; null while the vault is locked or the account has no signing key yet.*/- public static async ownIdentityCode(): Promise<string | null> {+ public static async ownAccountFingerprint(): Promise<string | null> {const [accountKey, encryptedSigningPrivateKey] = await Promise.all([VaultKeyService.getSessionAccountKey(), VaultKeyService.getEncryptedSigningPrivateKey()]);if (!accountKey || !encryptedSigningPrivateKey) {return null;@@ -54,7 +54,7 @@ export class SharingService {try {return await rustCore().accountSigningKeyFingerprint(encryptedSigningPrivateKey, accountKey);} catch (error) {- devWarn('[Sharing] The own signing key did not open, so no identity code can be shown.', error);+ devWarn('[Sharing] The own signing key did not open, so no account fingerprint can be shown.', error);return null;}}diff --git a/core/client/src/sharing/FamilySharingView.ts b/core/client/src/sharing/SharingView.tssimilarity index 77%rename from core/client/src/sharing/FamilySharingView.tsrename to core/client/src/sharing/SharingView.tsindex 004d7e9d8..1d080349f 100644--- a/core/client/src/sharing/FamilySharingView.ts+++ b/core/client/src/sharing/SharingView.ts@@ -14,7 +14,7 @@ export const MAX_SHARED_VAULT_NAME_LENGTH = 60;* The shared folders screen's text strings, in English only on purpose (temporary) as the UI is pending changes* so we don't let the translation platform see this yet until its finalized. TODO: move these strings to locale files.*/-export const familySharingText = {+export const sharingText = {/** Title of the people dialog of a folder. */peopleTitle: 'People with access',/** Shown in the people dialog of a folder that is not shared yet. */@@ -24,23 +24,23 @@ export const familySharingText = {/** Title of the dialog of an invitation to a shared folder. */sharedWithYou: (username: string, folder: string): string => `${username} shared “${folder}” with you`,sharedWithYouHint: 'Accept to see this folder and everything in it in your vault.',- yourCodeSettingsHint: 'Someone who shares a folder with you needs this code to invite you. It is not secret.',- /** Title of the step that asks for the inviter's code before accepting. */- inviterCodeTitle: (username: string): string => `Confirm the invitation from ${username}`,- /** Explains why the inviter's code is asked for. */- inviterCodeExplanation: (username: string): string => `For your security, enter the code of ${username}. It confirms that this invitation really comes from them. ${username} finds it in Settings on their device.`,+ yourFingerprintSettingsHint: 'Someone who shares a folder with you needs your account fingerprint to invite you. It is not secret.',+ /** Title of the step that asks for the inviter's account fingerprint before accepting. */+ inviterFingerprintTitle: (username: string): string => `Confirm the invitation from ${username}`,+ /** Explains why the inviter's account fingerprint is asked for. */+ inviterFingerprintExplanation: (username: string): string => `For your security, enter the account fingerprint of ${username}. It confirms that this invitation really comes from them. ${username} finds it in Settings on their device.`,/** Who sent an invitation, whose key this account verified before. */invitedByVerified: (username: string): string => `Invited by ${username} (verified)`,/** Who sent an invitation. */invitedBy: (username: string): string => `Invited by ${username}`,invitePeople: 'Invite someone',- /** Shown with this account's code while an invitation waits for an answer. */- pendingCodeTip: 'Tip: looking for your code to send to the people you invited? Here it is:',+ /** Shown with this account's fingerprint while an invitation waits for an answer. */+ pendingFingerprintTip: 'Tip: looking for your account fingerprint to send to the people you invited? Here it is:',notSharedYet: 'This folder is not shared with anyone yet. Invite someone to start sharing it.',inviteWizardChooseTitle: 'Who do you want to invite?',- inviteWizardNewCodeTitle: 'Or invite someone new with their code',- inviteWizardCodeTitle: 'Enter the code of the person you invite',- inviteWizardCodeHint: 'Ask the person to copy their code from Settings and send it to you. The code creates a secure link between your accounts. You only need to do this once per person.',+ inviteWizardNewFingerprintTitle: 'Or invite someone new with their account fingerprint',+ inviteWizardFingerprintTitle: 'Enter the account fingerprint of the person you invite',+ inviteWizardFingerprintHint: 'Ask the person to copy their account fingerprint from Settings and send it to you. It creates a secure link between your accounts. You only need to do this once per person.',inviteWizardConfirmTitle: 'Confirm the invitation',/** Asks to confirm who a personal folder is shared with, which makes it a shared folder. */inviteWizardConfirmShare: (username: string, folder: string): string => `You are about to share “${folder}” with ${username}. They can see, change and delete everything in it.`,@@ -48,14 +48,14 @@ export const familySharingText = {inviteWizardConfirmFolder: (username: string, folder: string): string => `You are about to invite ${username} to “${folder}”.`,/** Confirms the invitation went out. */inviteWizardInvited: (username: string): string => `${username} has been invited`,- inviteWizardNextStep: 'Next step: share your code',- /** Asks to send this account's own code to the person invited. */- inviteWizardShareHint: (username: string): string => `Send this code to ${username}. They need to enter it to accept your invitation.`,- inviteWizardShareNotSecret: 'This code is not secret. It only confirms that the invitation comes from you, so you can send it by email or in a chat app, or type it in by hand.',+ inviteWizardNextStep: 'Next step: share your account fingerprint',+ /** Asks to send this account's fingerprint to the person invited. */+ inviteWizardShareHint: (username: string): string => `Send your account fingerprint to ${username}. They need to enter it to accept your invitation.`,+ inviteWizardShareNotSecret: 'Your account fingerprint is not secret. It only confirms that the invitation comes from you, so you can send it by email or in a chat app.',/** A close button that is enabled after a short countdown. */closeCountdown: (seconds: number): string => `Close (${seconds})`,- codePlaceholder: '1234-5678-9012-3456-7890',- yourCode: 'Your code',+ fingerprintPlaceholder: '1234-5678-9012-3456-7890',+ yourFingerprint: 'Account fingerprint',accept: 'Accept',decline: 'Decline',owner: 'Owner',@@ -110,12 +110,12 @@ export const familySharingText = {alreadyHasAccess: 'That person already has access to this folder.',lastMemberWithAccess: 'Somebody has to be able to open the shared folder. Give someone else access to it first.',deleteVaultFailed: 'The shared folder could not be deleted. Please try again.',- codeNotFound: 'No account has this code. Check the code and try again.',- codeRateLimited: 'Too many codes were looked up. Please try again later.',- codeIsOwn: 'This is your own code. Enter the code of the other person instead.',- codeMismatch: 'This code is not correct. Ask the other person for their correct code.',- inviterNotVerified: 'First enter the code of the person who invited you.',- memberNotVerified: 'First invite this person with their code under Invite someone new.',+ fingerprintNotFound: 'No account has this account fingerprint. Check it and try again.',+ fingerprintRateLimited: 'Too many lookups. Please try again later.',+ fingerprintIsOwn: 'This is your own account fingerprint. Enter the one of the other person instead.',+ fingerprintMismatch: 'This account fingerprint is not correct. Ask the other person for their correct one.',+ inviterNotVerified: 'First enter the account fingerprint of the person who invited you.',+ memberNotVerified: 'First invite this person with their account fingerprint under Invite someone new.',aliasOwnedByOtherFolder: 'This email alias receives its emails in a shared folder you cannot open, or in the personal vault of someone else. Ask them to move it here.',},};@@ -182,7 +182,7 @@ function sortMembers<T extends Pick<GroupMemberInfo, 'role' | 'username'>>(membe}/**- * Whether this account certified the inviter's key before, so the invitation takes no code.+ * Whether this account certified the inviter's key before, so the invitation asks for no account fingerprint.* @param invitation - the invitation as served by the API.*/export function isInviterVerified(invitation: Pick<ReceivedManifestInvitation, 'inviterCertification'>): boolean {@@ -196,9 +196,9 @@ export function isInviterVerified(invitation: Pick<ReceivedManifestInvitation, '*/export function memberKeyProblem(member: Pick<GroupMemberInfo, 'accountPublicKey' | 'signingPublicKey' | 'keyCertification'>): string | null {if (!member.accountPublicKey || !member.signingPublicKey) {- return familySharingText.errors.userNotReady;+ return sharingText.errors.userNotReady;}- return member.keyCertification ? null : familySharingText.errors.memberNotVerified;+ return member.keyCertification ? null : sharingText.errors.memberNotVerified;}/**@@ -263,9 +263,9 @@ export function describeMemberAccess(group: Pick<GroupInfo, 'role'>, manifest: P*/export function roleLabel(member: Pick<GroupMemberInfo, 'role'>): string {switch (member.role) {- case 'owner': return familySharingText.owner;- case 'admin': return familySharingText.admin;- default: return familySharingText.member;+ case 'owner': return sharingText.owner;+ case 'admin': return sharingText.admin;+ default: return sharingText.member;}}@@ -276,19 +276,19 @@ export function roleLabel(member: Pick<GroupMemberInfo, 'role'>): string {*/export function sharingErrorMessage(apiErrorCode: string | null | undefined): string | null {switch (apiErrorCode) {- case 'INVITE_RECIPIENT_NOT_READY': return familySharingText.errors.userNotReady;- case 'ACCESS_ALREADY_GRANTED': return familySharingText.errors.alreadyHasAccess;- case 'INVITATION_ALREADY_EXISTS': return familySharingText.errors.alreadyInvited;- case 'INVITATION_NOT_FOUND': return familySharingText.errors.invitationGone;- case 'INVITATION_KEY_OUTDATED': return familySharingText.errors.invitationKeyOutdated;- case 'LAST_MANIFEST_GRANT_HOLDER': return familySharingText.errors.lastMemberWithAccess;- case 'SHARED_MANIFEST_IN_USE': return familySharingText.errors.revokeAccessFailed;- case 'IDENTITY_CODE_NOT_FOUND': return familySharingText.errors.codeNotFound;- case 'RATE_LIMIT_EXCEEDED': return familySharingText.errors.codeRateLimited;- case 'MEMBER_NOT_VERIFIED': return familySharingText.errors.memberNotVerified;- case 'INVITER_NOT_VERIFIED': return familySharingText.errors.inviterNotVerified;- case 'IDENTITY_CODE_MISMATCH': return familySharingText.errors.codeMismatch;- case 'IDENTITY_CODE_IS_OWN': return familySharingText.errors.codeIsOwn;+ case 'INVITE_RECIPIENT_NOT_READY': return sharingText.errors.userNotReady;+ case 'ACCESS_ALREADY_GRANTED': return sharingText.errors.alreadyHasAccess;+ case 'INVITATION_ALREADY_EXISTS': return sharingText.errors.alreadyInvited;+ case 'INVITATION_NOT_FOUND': return sharingText.errors.invitationGone;+ case 'INVITATION_KEY_OUTDATED': return sharingText.errors.invitationKeyOutdated;+ case 'LAST_MANIFEST_GRANT_HOLDER': return sharingText.errors.lastMemberWithAccess;+ case 'SHARED_MANIFEST_IN_USE': return sharingText.errors.revokeAccessFailed;+ case 'ACCOUNT_FINGERPRINT_NOT_FOUND': return sharingText.errors.fingerprintNotFound;+ case 'RATE_LIMIT_EXCEEDED': return sharingText.errors.fingerprintRateLimited;+ case 'MEMBER_NOT_VERIFIED': return sharingText.errors.memberNotVerified;+ case 'INVITER_NOT_VERIFIED': return sharingText.errors.inviterNotVerified;+ case 'ACCOUNT_FINGERPRINT_MISMATCH': return sharingText.errors.fingerprintMismatch;+ case 'ACCOUNT_FINGERPRINT_IS_OWN': return sharingText.errors.fingerprintIsOwn;default: return null;}}diff --git a/core/client/src/sync/VaultSync.ts b/core/client/src/sync/VaultSync.tsindex 7d513f855..3f11fd875 100644--- a/core/client/src/sync/VaultSync.ts+++ b/core/client/src/sync/VaultSync.ts@@ -80,7 +80,7 @@ export type SharingOperationResult = SyncErrorDetail & {success: boolean;/** The shared manifest the operation created, invited to or accepted. */manifestId?: string;- /** The account an identity code belonged to. */+ /** The account an account fingerprint belonged to. */username?: string;/** The account is already in the folder's group, so only its key was certified. */alreadyMember?: boolean;@@ -206,14 +206,14 @@ export class VaultSync {}/**- * Invite the account behind an identity code to a shared manifest. The engine checks the key the server returns- * against the code and certifies it; accepting also makes the account a member of the group. Never throws.+ * Invite the account behind an account fingerprint to a shared manifest. The engine checks the key the server returns+ * against the fingerprint and certifies it; accepting also makes the account a member of the group. Never throws.* @param groupId - the group the shared manifest belongs to* @param manifestId - the shared manifest to invite them to- * @param identityCode - the identity code the other person gave outside AliasVault+ * @param accountFingerprint - the account fingerprint the other person gave outside AliasVault*/- public async inviteToSharedManifestByCode(groupId: string, manifestId: string, identityCode: string): Promise<SharingOperationResult> {- return this.runSharingOperation('inviteToSharedManifest', { groupId, manifestId, identityCode });+ public async inviteToSharedManifestByFingerprint(groupId: string, manifestId: string, accountFingerprint: string): Promise<SharingOperationResult> {+ return this.runSharingOperation('inviteToSharedManifest', { groupId, manifestId, accountFingerprint });}/**@@ -227,23 +227,23 @@ export class VaultSync {}/**- * Find the account behind an identity code and check the code against its key, so the user can confirm who they invite,+ * Find the account behind an account fingerprint and check the fingerprint against its key, so the user can confirm who they invite,* also before the folder is shared. Certifies and invites nothing. Never throws.* @param groupId - the group of the shared folder the person is invited to, if it is shared already- * @param identityCode - the identity code the other person gave outside AliasVault+ * @param accountFingerprint - the account fingerprint the other person gave outside AliasVault*/- public async lookupIdentityCode(groupId: string | undefined, identityCode: string): Promise<SharingOperationResult> {- return this.runSharingOperation('lookupIdentityCode', { groupId, identityCode });+ public async lookupAccountFingerprint(groupId: string | undefined, accountFingerprint: string): Promise<SharingOperationResult> {+ return this.runSharingOperation('lookupAccountFingerprint', { groupId, accountFingerprint });}/*** Accept an invitation to a shared manifest: the engine checks the certified inviter signed it and signs the grant as* this account's own. Never throws.* @param invitationId - the invitation- * @param identityCode - the inviter's identity code, when they are not certified yet+ * @param accountFingerprint - the inviter's account fingerprint, when they are not certified yet*/- public async acceptSharedManifestInvitation(invitationId: string, identityCode?: string): Promise<SharingOperationResult> {- return this.runSharingOperation('acceptSharedManifestInvitation', { invitationId, identityCode });+ public async acceptSharedManifestInvitation(invitationId: string, accountFingerprint?: string): Promise<SharingOperationResult> {+ return this.runSharingOperation('acceptSharedManifestInvitation', { invitationId, accountFingerprint });}/**diff --git a/core/client/src/sync/VaultSyncEngine.ts b/core/client/src/sync/VaultSyncEngine.tsindex 5a811097f..20bfa5ebe 100644--- a/core/client/src/sync/VaultSyncEngine.ts+++ b/core/client/src/sync/VaultSyncEngine.ts@@ -21,7 +21,7 @@ import type { ISqliteDatabase, SqliteValue } from '../platform/SqliteEngine';/** The operations the engine runs. *//** The sharing operations, which take `VaultSyncSharingParams`. */-export type VaultSyncSharingOperation = 'createSharedManifest' | 'inviteToSharedManifest' | 'updateSharedManifest' | 'lookupIdentityCode' | 'acceptSharedManifestInvitation';+export type VaultSyncSharingOperation = 'createSharedManifest' | 'inviteToSharedManifest' | 'updateSharedManifest' | 'lookupAccountFingerprint' | 'acceptSharedManifestInvitation';export type VaultSyncOperation = 'fullSync' | 'migrationStatus' | 'migrateManifest' | 'statusCheck' | 'resolveVaultKey' | VaultSyncSharingOperation | 'rotateAccountKeys';@@ -48,7 +48,7 @@ export type VaultSyncSharingParams = {userId?: string;name?: string;invitationId?: string;- identityCode?: string;+ accountFingerprint?: string;};/** What the host hands the engine at session start (the Rust `SyncRequest`). */diff --git a/core/models/src/webapi/CapabilityKeys.ts b/core/models/src/webapi/CapabilityKeys.tsindex e4573d40a..579ef45e1 100644--- a/core/models/src/webapi/CapabilityKeys.ts+++ b/core/models/src/webapi/CapabilityKeys.ts@@ -6,7 +6,7 @@export const CapabilityKeys = {/*** Shared manifests: creating one, inviting people to it, and accepting an invitation to one. The capability- * behind the Family Sharing screens, and behind anything else built on a vault more than one account holds.+ * behind the sharing screens, and behind anything else built on a vault more than one account holds.*/VaultSharing: 'vault-sharing',} as const;diff --git a/core/models/src/webapi/Groups.ts b/core/models/src/webapi/Groups.tsindex c8ca7099c..e1655b91c 100644--- a/core/models/src/webapi/Groups.ts+++ b/core/models/src/webapi/Groups.ts@@ -85,7 +85,7 @@ export type GroupOverviewResponse = {userId: string;groups: GroupInfo[];receivedInvitations: ReceivedManifestInvitation[];- /** The people whose current signing key this user certified, who can be invited without their identity code. */+ /** The people whose current signing key this user certified, who can be invited without their account fingerprint. */verifiedPeople: GroupMemberInfo[];}diff --git a/core/rust/src/crypto/signing.rs b/core/rust/src/crypto/signing.rsindex df1722bff..ea14b047b 100644--- a/core/rust/src/crypto/signing.rs+++ b/core/rust/src/crypto/signing.rs@@ -30,7 +30,7 @@ pub const INVITATION_NAME_LABEL: &str = "aliasvault/v1/sig/invitation-name";pub const SIGNING_KEY_ROTATION_LABEL: &str = "aliasvault/v1/sig/signing-key-rotation";/// The label of a key certification: one user vouching that a signing public key belongs to another user, after checking-/// its fingerprint against the identity code that user gave them outside AliasVault.+/// its fingerprint against the account fingerprint that user gave them outside AliasVault.pub const KEY_CERTIFICATION_LABEL: &str = "aliasvault/v1/sig/key-certification";/// The label under which a signing public key is hashed into its fingerprint.@@ -127,7 +127,7 @@ pub fn signing_public_key_of(private_key_base64: &str) -> VaultResult<String> {/// The fingerprint of a base64 signing public key: [`FINGERPRINT_DIGITS`] decimal digits in groups of four (`1234-5678-...`),/// taken from the SHA-256 of the key under [`FINGERPRINT_LABEL`]. Two users compare it outside AliasVault to check that-/// the server handed each of them the other's real key. This is the user's identity code (the family code in the apps).+/// the server handed each of them the other's real key. This is the user's account fingerprint.pub fn fingerprint(public_key_base64: &str) -> VaultResult<String> {let key = verifying_key(public_key_base64)?;let digest = Sha256::digest(signed_message(FINGERPRINT_LABEL, &[key.as_bytes()]));@@ -137,7 +137,7 @@ pub fn fingerprint(public_key_base64: &str) -> VaultResult<String> {Ok(digits.chars().collect::<Vec<_>>().chunks(FINGERPRINT_GROUP_DIGITS).map(|group| group.iter().collect::<String>()).collect::<Vec<_>>().join("-"))}-/// Whether a code a user typed is the fingerprint of a signing public key. Only the digits count, so spaces and dashes may differ.+/// Whether a fingerprint a user typed is the fingerprint of a signing public key. Only the digits count, so spaces and dashes may differ.pub fn fingerprint_matches(public_key_base64: &str, code: &str) -> bool {let typed: String = code.chars().filter(char::is_ascii_digit).collect();fingerprint(public_key_base64).is_ok_and(|expected| expected.chars().filter(char::is_ascii_digit).collect::<String>() == typed)@@ -219,7 +219,7 @@ mod tests {const DELIVERY_KEY_MESSAGE_VECTOR: &str = "0000001e616c6961737661756c742f76312f7369672f64656c69766572792d6b65790000002430613162326333642d303030302d303030302d303030302d3030303030303030303030310000000d7b226b7479223a22525341227d000000023432";/// Known-answer vector for the fingerprint, which every client shows for the same key. A changed output means two- /// app versions show different codes for one key. Never regenerate it.+ /// app versions show different fingerprints for one key. Never regenerate it.#[test]fn fingerprint_known_answer() {assert_eq!(fingerprint(PUBLIC_KEY_VECTOR).unwrap(), FINGERPRINT_VECTOR);diff --git a/core/rust/src/vault_sync/engine.rs b/core/rust/src/vault_sync/engine.rsindex a24745089..a0fc9343f 100644--- a/core/rust/src/vault_sync/engine.rs+++ b/core/rust/src/vault_sync/engine.rs@@ -35,7 +35,7 @@ pub(crate) async fn run(host: Host, request: SyncRequest) -> Value {SyncOperation::CreateSharedManifest => serde_json::to_value(sharing::create_shared_manifest_operation(&mut ctx).await),SyncOperation::InviteToSharedManifest => serde_json::to_value(sharing::invite_to_shared_manifest_operation(&mut ctx).await),SyncOperation::UpdateSharedManifest => serde_json::to_value(sharing::update_shared_manifest_operation(&mut ctx).await),- SyncOperation::LookupIdentityCode => serde_json::to_value(sharing::lookup_identity_code_operation(&mut ctx).await),+ SyncOperation::LookupAccountFingerprint => serde_json::to_value(sharing::lookup_account_fingerprint_operation(&mut ctx).await),SyncOperation::AcceptSharedManifestInvitation => serde_json::to_value(sharing::accept_shared_manifest_invitation_operation(&mut ctx).await),SyncOperation::RotateAccountKeys => serde_json::to_value(rotation::rotate_account_keys_operation(&mut ctx).await),};diff --git a/core/rust/src/vault_sync/sharing.rs b/core/rust/src/vault_sync/sharing.rsindex 05bc58f93..aa64eb09e 100644--- a/core/rust/src/vault_sync/sharing.rs+++ b/core/rust/src/vault_sync/sharing.rs@@ -2,7 +2,7 @@//! inviting to a group or a shared manifest, and accepting those invitations.//!//! Trust between two accounts rests on key certifications: once a user has checked another account's signing key (outside-//! AliasVault) against that account's identity code (the key's fingerprint, the family code in the apps), a client signs a+//! AliasVault) against that account's account fingerprint (the key's fingerprint), a client signs a//! statement that the served key belongs to that account. A certification is only ever checked under the certifier's own signing key,//! derived from their private key, so the server can hide one but not forge one. An admin certifies a member before inviting them anywhere;//! a member certifies the admin before accepting anything from them. A grant opens only once signed by its holder.@@ -26,17 +26,17 @@ const ROLE_MEMBER: &str = "member";/// The API error code for a recipient whose account has no keypair yet (legacy non-migrated user account).const INVITE_RECIPIENT_NOT_READY: &str = "INVITE_RECIPIENT_NOT_READY";-/// The API error code for a member whose signing key this account has not certified with their identity code.+/// The API error code for a member whose signing key this account has not certified with their account fingerprint.const MEMBER_NOT_VERIFIED: &str = "MEMBER_NOT_VERIFIED";-/// The API error code for an inviter whose signing key this account has not certified with their identity code.+/// The API error code for an inviter whose signing key this account has not certified with their account fingerprint.const INVITER_NOT_VERIFIED: &str = "INVITER_NOT_VERIFIED";-/// The refusal code for an identity code that is not the fingerprint of the key the server served.-const IDENTITY_CODE_MISMATCH: &str = "IDENTITY_CODE_MISMATCH";+/// The refusal code for an account fingerprint that is not the fingerprint of the key the server served.+const ACCOUNT_FINGERPRINT_MISMATCH: &str = "ACCOUNT_FINGERPRINT_MISMATCH";-/// The refusal code for an identity code that is this account's own, typed where the other person's code was asked for.-const IDENTITY_CODE_IS_OWN: &str = "IDENTITY_CODE_IS_OWN";+/// The refusal code for an account fingerprint that is this account's own, typed where the other person's code was asked for.+const ACCOUNT_FINGERPRINT_IS_OWN: &str = "ACCOUNT_FINGERPRINT_IS_OWN";/// The longest name an invitation can carry: RSA-2048 OAEP-SHA256 fits 190 bytes. The UI caps names well below this.const MAX_SHARED_MANIFEST_NAME_BYTES: usize = 190;@@ -51,7 +51,7 @@ struct GroupOverview {groups: Vec<GroupInfo>,#[serde(default)]received_invitations: Vec<ReceivedManifestInvitation>,- /// The people whose current signing key the caller certified, who can be invited without their identity code.+ /// The people whose current signing key the caller certified, who can be invited without their account fingerprint.#[serde(default)]verified_people: Vec<GroupMemberInfo>,}@@ -86,13 +86,13 @@ struct ReceivedManifestInvitation {#[derive(Debug, Serialize)]#[serde(rename_all = "camelCase")]-struct IdentityCodeLookupRequest<'a> {+struct AccountFingerprintLookupRequest<'a> {code: &'a str,}#[derive(Debug, Clone, Deserialize)]#[serde(rename_all = "camelCase")]-struct IdentityCodeLookupResponse {+struct AccountFingerprintLookupResponse {user_id: String,#[serde(default)]username: String,@@ -105,7 +105,7 @@ struct IdentityCodeLookupResponse {account_public_key_signature: Option<String>,}-/// The account a shared manifest's key is encrypted for: a group member, or an account found by its identity code.+/// The account a shared manifest's key is encrypted for: a group member, or an account found by its account fingerprint.struct Recipient {user_id: String,username: String,@@ -163,7 +163,7 @@ struct GroupMemberInfo {account_public_key_signature: Option<String>,#[serde(default)]signing_public_key: Option<String>,- /// This account's certification of `signing_public_key`, made when it checked the member's identity code.+ /// This account's certification of `signing_public_key`, made when it checked the member's account fingerprint.#[serde(default)]key_certification: Option<String>,}@@ -257,10 +257,10 @@ pub(crate) async fn update_shared_manifest_operation(ctx: &mut Ctx) -> SharingOpfinish(ctx, "update shared manifest", outcome).await}-/// Find the account behind an identity code, before inviting it.-pub(crate) async fn lookup_identity_code_operation(ctx: &mut Ctx) -> SharingOperationResult {- let outcome = lookup_identity_code(ctx).await;- finish(ctx, "look up identity code", outcome).await+/// Find the account behind an account fingerprint, before inviting it.+pub(crate) async fn lookup_account_fingerprint_operation(ctx: &mut Ctx) -> SharingOperationResult {+ let outcome = lookup_account_fingerprint(ctx).await;+ finish(ctx, "look up account fingerprint", outcome).await}/// Accept an invitation to a shared manifest.@@ -352,8 +352,8 @@ impl OwnIdentity {Ok(crypto::signing::sign(self.signing_key.expose_secret(), message)?)}- /// Whether `code` is this account's own identity code.- fn is_own_code(&self, code: &str) -> bool {+ /// Whether `code` is this account's own account fingerprint.+ fn is_own_fingerprint(&self, code: &str) -> bool {crypto::signing::fingerprint_matches(&self.signing_public_key, code)}@@ -363,28 +363,28 @@ impl OwnIdentity {}/// Make sure this account certified `subject_key` as `subject_user_id`'s: before (`certification`), or now from the- /// typed `identity_code`. Without either, the refusal says whose code is needed (`not_verified`).- async fn ensure_certified(&self, ctx: &Ctx, subject_user_id: &str, subject_key: &str, certification: Option<&str>, identity_code: Option<&str>, not_verified: &str) -> SyncResult<Result<(), Refusal>> {+ /// typed `account_fingerprint`. Without either, the refusal says whose fingerprint is needed (`not_verified`).+ async fn ensure_certified(&self, ctx: &Ctx, subject_user_id: &str, subject_key: &str, certification: Option<&str>, account_fingerprint: Option<&str>, not_verified: &str) -> SyncResult<Result<(), Refusal>> {if self.certified(subject_user_id, subject_key, certification) {return Ok(Ok(()));}- match identity_code.map(str::trim).filter(|code| !code.is_empty()) {- Some(code) => self.certify_with_code(ctx, subject_user_id, subject_key, code).await,+ match account_fingerprint.map(str::trim).filter(|code| !code.is_empty()) {+ Some(code) => self.certify_with_fingerprint(ctx, subject_user_id, subject_key, code).await,None => Ok(Err(Refusal::Api(not_verified.to_string()))),}}- /// Certify `subject_key` as `subject_user_id`'s after checking it against the identity code the user typed, and store the certification.- async fn certify_with_code(&self, ctx: &Ctx, subject_user_id: &str, subject_key: &str, code: &str) -> SyncResult<Result<(), Refusal>> {- if self.is_own_code(code) {- return Ok(Err(Refusal::Api(IDENTITY_CODE_IS_OWN.to_string())));+ /// Certify `subject_key` as `subject_user_id`'s after checking it against the account fingerprint the user typed, and store the certification.+ async fn certify_with_fingerprint(&self, ctx: &Ctx, subject_user_id: &str, subject_key: &str, code: &str) -> SyncResult<Result<(), Refusal>> {+ if self.is_own_fingerprint(code) {+ return Ok(Err(Refusal::Api(ACCOUNT_FINGERPRINT_IS_OWN.to_string())));}if !crypto::signing::fingerprint_matches(subject_key, code) {- return Ok(Err(Refusal::Api(IDENTITY_CODE_MISMATCH.to_string())));+ return Ok(Err(Refusal::Api(ACCOUNT_FINGERPRINT_MISMATCH.to_string())));}let signature = self.sign(&crypto::signing::key_certification_message(&self.user_id, subject_user_id, subject_key))?;http::post_no_content(&ctx.host, "Groups/certifications", &CertifyKeyRequest { subject_user_id, subject_signing_public_key: subject_key, signature: &signature }).await?;- ctx.log(format!("[Sharing] Certified the signing key of {} with their identity code.", subject_user_id)).await;+ ctx.log(format!("[Sharing] Certified the signing key of {} with their account fingerprint.", subject_user_id)).await;Ok(Ok(()))}}@@ -503,16 +503,16 @@ async fn invite_to_shared_manifest(ctx: &mut Ctx) -> Outcome {let Some(me) = OwnIdentity::open(ctx, &overview).await? else { return Ok(Err(Refusal::VaultUpgradeRequired)) };/*- * The recipient is either an account found by the identity code the user typed, whose key is certified with it now+ * The recipient is either an account found by the account fingerprint the user typed, whose key is certified with it now* (accepting then also makes them a member), or a member this account certified before.*/- let recipient = match target.identity_code.as_deref().map(str::trim).filter(|code| !code.is_empty()) {+ let recipient = match target.account_fingerprint.as_deref().map(str::trim).filter(|code| !code.is_empty()) {Some(code) => {- if me.is_own_code(code) {- return Ok(Err(Refusal::Api(IDENTITY_CODE_IS_OWN.to_string())));+ if me.is_own_fingerprint(code) {+ return Ok(Err(Refusal::Api(ACCOUNT_FINGERPRINT_IS_OWN.to_string())));}- let account: IdentityCodeLookupResponse = http::post(&ctx.host, "Groups/lookup", &IdentityCodeLookupRequest { code }, false).await?;- if let Err(refusal) = me.certify_with_code(ctx, &account.user_id, &account.signing_public_key, code).await? {+ let account: AccountFingerprintLookupResponse = http::post(&ctx.host, "Groups/lookup", &AccountFingerprintLookupRequest { code }, false).await?;+ if let Err(refusal) = me.certify_with_fingerprint(ctx, &account.user_id, &account.signing_public_key, code).await? {return Ok(Err(refusal));}Recipient {@@ -528,7 +528,7 @@ async fn invite_to_shared_manifest(ctx: &mut Ctx) -> Outcome {// A member of the group, or a person verified before who is not in it yet.let user_id = target.user_id.clone().ok_or_else(|| SyncError::Other("The invitation names no recipient".to_string()))?;let member = group.members.iter().chain(overview.verified_people.iter()).find(|candidate| candidate.user_id == user_id).ok_or_else(|| SyncError::Other("The recipient is neither in the group nor verified".to_string()))?;- // The served signing key is trusted only through this account's own certification of it, made with the member's identity code.+ // The served signing key is trusted only through this account's own certification of it, made with the member's account fingerprint.if member.signing_public_key.as_deref().is_some_and(|key| !me.certified(&member.user_id, key, member.key_certification.as_deref())) {return Ok(Err(Refusal::Api(MEMBER_NOT_VERIFIED.to_string())));}@@ -591,21 +591,21 @@ async fn invite_to_shared_manifest(ctx: &mut Ctx) -> Outcome {Ok(Ok(Done { manifest_id: Some(manifest.manifest_id.clone()), username: Some(recipient.username), ..Default::default() }))}-/// Look up the account behind an identity code and check the code against the key the server returns, so the user can+/// Look up the account behind an account fingerprint and check the fingerprint against the key the server returns, so the user can/// confirm who they invite, also before the folder they invite to is shared. Nothing is certified or invited;-/// `invite_to_shared_manifest` looks the code up again. With a group, the result says whether the account is in it.-async fn lookup_identity_code(ctx: &mut Ctx) -> Outcome {+/// `invite_to_shared_manifest` looks the fingerprint up again. With a group, the result says whether the account is in it.+async fn lookup_account_fingerprint(ctx: &mut Ctx) -> Outcome {let target = params(ctx)?;- let code = target.identity_code.as_deref().map(str::trim).filter(|code| !code.is_empty()).ok_or_else(|| SyncError::Other("The lookup carries no identity code".to_string()))?;+ let code = target.account_fingerprint.as_deref().map(str::trim).filter(|code| !code.is_empty()).ok_or_else(|| SyncError::Other("The lookup carries no account fingerprint".to_string()))?;let overview = fetch_overview(ctx).await?;let group = target.group_id.as_deref().map(|group_id| administered_group(&overview, group_id)).transpose()?;- if OwnIdentity::open(ctx, &overview).await?.is_some_and(|me| me.is_own_code(code)) {- return Ok(Err(Refusal::Api(IDENTITY_CODE_IS_OWN.to_string())));+ if OwnIdentity::open(ctx, &overview).await?.is_some_and(|me| me.is_own_fingerprint(code)) {+ return Ok(Err(Refusal::Api(ACCOUNT_FINGERPRINT_IS_OWN.to_string())));}- let account: IdentityCodeLookupResponse = http::post(&ctx.host, "Groups/lookup", &IdentityCodeLookupRequest { code }, false).await?;+ let account: AccountFingerprintLookupResponse = http::post(&ctx.host, "Groups/lookup", &AccountFingerprintLookupRequest { code }, false).await?;if !crypto::signing::fingerprint_matches(&account.signing_public_key, code) {- return Ok(Err(Refusal::Api(IDENTITY_CODE_MISMATCH.to_string())));+ return Ok(Err(Refusal::Api(ACCOUNT_FINGERPRINT_MISMATCH.to_string())));}let already_member = group.is_some_and(|group| group.members.iter().any(|member| member.user_id == account.user_id));@@ -630,7 +630,7 @@ async fn accept_shared_manifest_invitation(ctx: &mut Ctx) -> Outcome {let Some(me) = OwnIdentity::open(ctx, &overview).await? else { return Ok(Err(Refusal::VaultUpgradeRequired)) };let Some(own_public_key) = keys::own_account_public_key(ctx).await? else { return Ok(Err(Refusal::VaultUpgradeRequired)) };- if let Err(refusal) = me.ensure_certified(ctx, &invitation.inviter_user_id, signer_public_key, invitation.inviter_certification.as_deref(), target.identity_code.as_deref(), INVITER_NOT_VERIFIED).await? {+ if let Err(refusal) = me.ensure_certified(ctx, &invitation.inviter_user_id, signer_public_key, invitation.inviter_certification.as_deref(), target.account_fingerprint.as_deref(), INVITER_NOT_VERIFIED).await? {return Ok(Err(refusal));}diff --git a/core/rust/src/vault_sync/types.rs b/core/rust/src/vault_sync/types.rsindex b9a1a6b6c..e8218eab8 100644--- a/core/rust/src/vault_sync/types.rs+++ b/core/rust/src/vault_sync/types.rs@@ -27,13 +27,13 @@ pub enum SyncOperation {ResolveVaultKey,/// Create a shared manifest, with a group of its own that this account owns; see `SharingParams`.CreateSharedManifest,- /// Invite somebody to a shared manifest (by identity code, or a person verified before), handing them its key encrypted+ /// Invite somebody to a shared manifest (by account fingerprint, or a person verified before), handing them its key encrypted/// for their account keypair.InviteToSharedManifest,/// Change the details of a shared manifest (its name); the server refuses anyone but an administrator of its group.UpdateSharedManifest,- /// Find the account behind an identity code and check the code against its key, without certifying or inviting it.- LookupIdentityCode,+ /// Find the account behind an account fingerprint and check the fingerprint against its key, without certifying or inviting it.+ LookupAccountFingerprint,/// Accept an invitation to a shared manifest, signing the grant with this account's own key.AcceptSharedManifestInvitation,/// Rotate the account's keys and re-encrypt the personal vault under them; see `KeyRotationParams`.@@ -74,9 +74,9 @@ pub struct SharingParams {pub name: Option<String>,#[serde(default)]pub invitation_id: Option<String>,- /// The other party's identity code as the user typed it, for the operations that certify a key.+ /// The other party's account fingerprint as the user typed it, for the operations that certify a key.#[serde(default)]- pub identity_code: Option<String>,+ pub account_fingerprint: Option<String>,}/// Sync request.@@ -227,7 +227,7 @@ pub struct SharingOperationResult {/// The manifest the operation created or invited to.#[serde(skip_serializing_if = "Option::is_none")]pub manifest_id: Option<String>,- /// The account an identity code belonged to.+ /// The account an account fingerprint belonged to.#[serde(skip_serializing_if = "Option::is_none")]pub username: Option<String>,/// The account was already a member, so only its key was certified.