A corporate authentication library (v1.1.17) for Metro (METRO/MAKRO) loyalty card applications. It provides a pre-built UI flow for phone number entry, SMS code verification, card selection, registration, and manual card linking. The library requires a recaptcha v3 key and an authorization token. It is proprietary (Russian-language docs only) and intended solely for internal Metro use. No release cadence documented; single-version package with limited community adoption. Differentiators: bundled CSS and callbacks for each step, but dependency on Metro-specific APIs and lack of ESM/TypeScript support (no typings) make it unsuitable for general use.
npm install uit-metro-universal-auth-libraryVerified import paths — ran on the pinned version, not inferred.
Initialize the authentication library with required environment, authorization key, and optional texts/callbacks.
Ensure you have access to the private npm registry and are logged in with correct credentials.
Override texts via the initParams.texts object; for other languages, you must provide translations.
Explicitly set all text fields in initParams to avoid unexpected UI changes.
Run `npm install uit-metro-universal-auth-library` and ensure your project uses ESM (e.g., `"type": "module"` in package.json).
Use `import { AuthInit } from 'uit-metro-universal-auth-library';` instead of `import AuthInit from ...`.Use `import 'uit-metro-universal-auth-library/dist/styles/main.css';` — no named import.