New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

gauth-decode

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gauth-decode

A package to decode Google Authenticator export data

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
223
-0.45%
Maintainers
1
Weekly downloads
 
Created
Source

gauth-decode

A NPM package to decode Google Authenticator export data npm FOSSA Status

Usage

import { decodeMigrationUri } from "gauth-decode";

void decodeMigrationUri("otpauth-migration://offline?data=Ch8KBdFBKZJTEgpUZXN0IFRva2VuGgQyRkFTIAEoATACEAEYASAAKIji6ej7%2F%2F%2F%2F%2FwE%3D").then(result = console.log(result));

output:

[
    {
        algorithm: "ALGO_SHA1",
        digits: 1,
        issuer: "2FAS",
        name: "Test Token",
        secret: "0UEpklM=",
        secretBase32: "2FASTEST",
        type: "OTP_TOTP"
    }
]

Sample data

A sample TOTP QR code from 2FAS:

image

Contained URI data: otpauth://totp/Test%20Token?secret=2FASTEST&issuer=2FAS

The same sample data exported from Google authenticator:

image

Contained URI data: otpauth-migration://offline?data=Ch8KBdFBKZJTEgpUZXN0IFRva2VuGgQyRkFTIAEoATACEAEYASAAKIji6ej7%2F%2F%2F%2F%2FwE%3D and this can be decoded using this package.

Thanks to

License

FOSSA Status

Keywords

TOTP

FAQs

Package last updated on 28 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts