otpauth_migration 0.0.6 copy "otpauth_migration: ^0.0.6" to clipboard
otpauth_migration: ^0.0.6 copied to clipboard

A Dart package to encode and decode the otpauth-migration URI format used to import into and export 2FA secrets from the Google Authenticator app.

example/otpauth_migration_example.dart

// ignore_for_file: avoid_print
// @dart = 2.3
library example;

import 'package:otpauth_migration/otpauth_migration.dart';

void main() {
  final otpAuthParser = OtpAuthMigration();
  List<String> uris = otpAuthParser.decode(
      "otpauth-migration://offline?data=Cj8KFGnEpnTMQ7KDguNWnddyGyCbSVLaEhhBQ01FIENvOmpvaG5AZXhhbXBsZS5jb20aB0FDTUUgQ28gASgBMAIKRAoUXkj+5MY2arwKjsnH2aDsbm6TAlYSG0JldGEgTHRkLjpob21lckBleGFtcGxlLmNvbRoJQmV0YSBMdGQuIAEoATACCkgKFDDFyzUNPgYoI3q/KGHBdcNU9ptWEh1DYXRzICYgRG9nczptYXJnZUBleGFtcGxlLmNvbRoLQ2F0cyAmIERvZ3MgASgBMAIKSAoUunHzbm5h/LUO0yilLMI+dYZY1eISHURhaWx5IEJ1Z2xlOnBldGVyQGV4YW1wbGUuY29tGgtEYWlseSBCdWdsZSABKAEwAhABGAEgACjDnb+uAg==");
  print(uris);
  String uri = otpAuthParser.encode([
    "otpauth://totp/ACME%20Co:john.doe@example.com?secret=HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ&issuer=ACME+Co",
    "otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example"
  ]);
  print(uri);
}
5
likes
140
pub points
56%
popularity

Publisher

verified publisherquiznoob.app

A Dart package to encode and decode the otpauth-migration URI format used to import into and export 2FA secrets from the Google Authenticator app.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

fixnum, flutter, protobuf

More

Packages that depend on otpauth_migration