{"id":26746,"library":"auth-lib","title":"auth-lib","description":"A test authentication library for demonstration purposes. Version 1.0.0 is the initial release. No release cadence or differentiators are documented. This package is intended for testing and should not be used in production.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/alainr3d/auth-lib","tags":["javascript"],"install":[{"cmd":"npm install auth-lib","lang":"bash","label":"npm"},{"cmd":"yarn add auth-lib","lang":"bash","label":"yarn"},{"cmd":"pnpm add auth-lib","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM only; use dynamic import or bundler for CommonJS environments.","wrong":"const authLib = require('auth-lib')","symbol":"default","correct":"import authLib from 'auth-lib'"},{"note":"Named export, not default.","wrong":"import login from 'auth-lib'","symbol":"login","correct":"import { login } from 'auth-lib'"},{"note":"Named export for the class.","wrong":"import AuthClient from 'auth-lib'","symbol":"AuthClient","correct":"import { AuthClient } from 'auth-lib'"}],"quickstart":{"code":"import { login } from 'auth-lib';\n\nasync function main() {\n  const result = await login({\n    username: 'user',\n    password: process.env.PASSWORD ?? ''\n  });\n  console.log(result.token);\n}\nmain().catch(console.error);","lang":"typescript","description":"Demonstrates basic usage of the login function with environment variable for password."},"warnings":[{"fix":"Use a production-ready auth library.","message":"Package is a test library; not intended for production use.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install auth-lib' and ensure import path matches package name.","cause":"Package not installed or import path incorrect.","error":"Cannot find module 'auth-lib'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}