auth-lib

raw JSON →
1.0.0 verified Sat Apr 25 auth: no javascript

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.

error Cannot find module 'auth-lib'
cause Package not installed or import path incorrect.
fix
Run 'npm install auth-lib' and ensure import path matches package name.
gotcha Package is a test library; not intended for production use.
fix Use a production-ready auth library.
npm install auth-lib
yarn add auth-lib
pnpm add auth-lib

Demonstrates basic usage of the login function with environment variable for password.

import { login } from 'auth-lib';

async function main() {
  const result = await login({
    username: 'user',
    password: process.env.PASSWORD ?? ''
  });
  console.log(result.token);
}
main().catch(console.error);