garmin-connect-2fa
v1.6.3
Published
Fork of garmin-connect with added support for MFA/2FA out of the box. Maintained by La JOJ for Kleaan_OS.
Downloads
224
Maintainers
Readme
Garmin Connect API (with 2FA / MFA Support)
Maintained by La JOJ for KLEAAN_OS The brutalist operating system designed for ADHD.
This repository is a fork/patch of the popular garmin-connect package, specifically designed to fix and fully support Garmin's mandatory 2-Factor Authentication (2FA / MFA) which broke the original repository.
Since the original package has been abandoned for months and hundreds of developers are struggling with Garmin API connections, we decided to extract our patched version used in production on KLEAAN_OS and open-source it for the community.
🚀 Why this package?
Garmin recently enforced MFA (Multi-Factor Authentication) across all accounts, effectively breaking most existing scraper/API wrappers. This package resolves the authentication flow to handle MFA seamlessly.
Built and maintained for KLEAAN_OS - A hardcore productivity system that connects to your Garmin watch to measure actual mental load and penalize procrastination.
📦 Installation
npm install garmin-connect-2fa🛠 Usage
const GarminConnect = require('garmin-connect-2fa').default;
// Example login and fetching data
async function run() {
const GCClient = new GarminConnect({ username: 'your-email', password: 'your-password' });
try {
await GCClient.login('your-email', 'your-password');
console.log('Login successful with MFA handled!');
// Fetch user profile
const userProfile = await GCClient.getUserProfile();
console.log("User Profile:", userProfile);
// Fetch daily steps
const date = new Date();
const steps = await GCClient.getSteps(date);
console.log("Steps:", steps);
} catch (err) {
console.error('Error connecting to Garmin:', err.message);
}
}
run();❤️ Credits
- Original base codebase by Pythe1337N.
- MFA Patches, fixes, and current maintenance by La JOJ for KLEAAN_OS.
If this saved your project, check out KLEAAN_OS and see how we use Garmin biometric data to hack ADHD and productivity!
