UnENVerse 0.84.0
Local-first desktop secrets manager — TypeScript frontend
Loading...
Searching...
No Matches
totp-io.ts File Reference

Importing and exporting authenticator seeds (Phase 22). More...

Variables

 import { st, inTauri, persist, triggerRender } from './state'
import type { VaultEntry } from './types'
const invoke = invokeTauri
export interface SkippedImport
 One entry the importer declined, and why.
reason __pad0__
export interface MergeReport
 What totp_import_merge hands back.
format __pad1__
created __pad2__
account __pad3__
updated __pad4__
account __pad5__
unchanged __pad6__
account __pad7__
conflicts __pad8__
 Entries already holding a different seed.
account __pad9__
skipped __pad10__
export const EXPORT_FORMATS
 Formats the exporter can write, in the order the picker offers them.
label __pad11__
ext __pad12__
ext label
ext ext

Detailed Description

Importing and exporting authenticator seeds (Phase 22).

@description Ente Auth, Aegis, 2FAS, andOTP, Bitwarden and Google Authenticator on the way in; a portable otpauth:// list, Aegis or 2FAS on the way out.

Everything hard happens in Rust

Six formats parsed twice is six chances for the app and the CLI to disagree about what a file meant, and a disagreement here is a seed that imports with the wrong period and produces codes the issuer rejects. So this module holds no parser, no format writer and — the part with real consequences — no merge rules. vault_core::totp_import owns all three; unv totp import and the button wired up here call the same functions.

What is left here is the file picker, the confirmation, and turning the report into a sentence.

The export is a file full of secrets

buildTotpExport returns plaintext seeds. It is handed straight to a download and never to a toast, a log or the clipboard — the app's equivalent of the CLI's --out, which is the only way a real value leaves there either.

Variable Documentation

◆ import

import { st, inTauri, persist, triggerRender } from './state'

◆ type

import type { VaultEntry } from './types'

◆ invoke

const invoke = invokeTauri

◆ SkippedImport

export interface SkippedImport
Initial value:
{
name: string
let name
Definition modals.ts:2193

One entry the importer declined, and why.

Never carries a secret.

◆ __pad0__

reason __pad0__

◆ MergeReport

export interface MergeReport
Initial value:
{
entries: VaultEntry[]
as unknown as VaultEntry
Definition settings-panel.ts:1060

What totp_import_merge hands back.

◆ __pad1__

format __pad1__

◆ __pad2__

created __pad2__

◆ __pad3__

account __pad3__

◆ __pad4__

updated __pad4__

◆ __pad5__

account __pad5__

◆ __pad6__

unchanged __pad6__

◆ __pad7__

account __pad7__

◆ __pad8__

conflicts __pad8__

Entries already holding a different seed.

Left alone; see the note below.

◆ __pad9__

account __pad9__

◆ __pad10__

skipped __pad10__

◆ EXPORT_FORMATS

export const EXPORT_FORMATS

Formats the exporter can write, in the order the picker offers them.

◆ __pad11__

label __pad11__

◆ __pad12__

ext __pad12__

◆ label

ext label

◆ ext

ext ext