Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@thomaschaplin/image-to-totp
Advanced tools
image-to-totp is a library to generate totp codes from a QR code image with a single API.
npm install @thomaschaplin/image-to-totp
Find full example here but see the below code snippet
src/
images/
example1.png
example2.png
import { imageToTotp } from "@thomaschaplin/image-to-totp";
import * as path from "path";
const example = async (account: string) => {
const projectBaseFolder = path.join(__dirname, "../");
const imagesFolder = path.join(projectBaseFolder, "src/images");
const totp = await imageToTotp(`${imagesFolder}/${account}.png`);
console.log(`Account: ${account} - ${totp}`);
};
example("example1"); // Account: example1 - 034624
example("example2"); // Account: example2 - 084841
This repository allows you to take a QR code image and turn it into a TOTP code.
This project uses:
Make sure you have Node.js installed on your machine
git clone git@github.com:thomaschaplin/image-to-totp.git
cd image-to-totp
npm install
npm run build
or npm run watch
npm test
npm run test:coverage
npm run test:mutation
Image by mohamed Hassan from Pixabay
FAQs
image-to-totp converts qr code images to totp codes
We found that @thomaschaplin/image-to-totp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.