Skip to content

Instantly share code, notes, and snippets.

View lalosh's full-sized avatar

Louay Al-osh lalosh

View GitHub Profile
@lalosh
lalosh / gist:4b975f8ab28dd85e17a684d3152f0c3e
Last active January 31, 2025 09:44
TOTP generator in case you lost your phone
/**
* how to use?
* install node.js + npm, copy the code in a clean folder,
* run `npm i totp-generator`
* run `node main.mjs <OTP-CODE>`
* you must have the OTP code from the service provider itself (which you get when you did the Multi-factor setup)
*/
import { TOTP } from "totp-generator";