A lightweight parser for Google Authenticator Account Export QR code data (otpauth-migration:// URIs). Version 0.1.1 is current, with no active development cadence. It decodes protobuf-encoded migration payloads into structured token information including secret, name, issuer, algorithm, digits, type, and counter. Differentiated by being the only dedicated npm package specifically for decoding the migration format, as opposed to general OTP URI parsers.
npm install otpauth-migration-parserNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows ESM import, parsing a sample Google Authenticator migration URI, and iterating over decoded accounts.
Convert counter to number with: counter.toNumber() or use a bigint library.
Ensure the URI is a full migration link, not a standard otpauth:// URI.
Use await or .then() when calling the parser.
Use EsModuleInterop: true and import parser from 'otpauth-migration-parser'. If using require, do const parser = require('otpauth-migration-parser').default;Verify the URI is a valid 'otpauth-migration://offline?data=...' link from Google Authenticator export.