Registry / auth-security / uit-metro-universal-auth-library

uit-metro-universal-auth-library

JSON →
library1.1.17jsnpmunverified

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-library
INSTALL
IMPORT
SIG · UIT-METRO-UNIVERSA
U
uit-metro-universal-auth-library
auth-securityjavascriptv1.1.17
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AuthInit
import { AuthInit } from 'uit-metro-universal-auth-library';
const { AuthInit } = require('uit-metro-universal-auth-library');
Package is ESM-only; CommonJS require() will fail in Node <22 and bundlers that don't handle ESM.
styles
import 'uit-metro-universal-auth-library/dist/styles/main.css';
import { styles } from 'uit-metro-universal-auth-library';
CSS must be imported as a side effect, not a named export.
AuthInit (default import)
import AuthInit from 'uit-metro-universal-auth-library';
import { AuthInit } from 'uit-metro-universal-auth-library';
Both default and named imports work, but the named export is the documented way.

Initialize the authentication library with required environment, authorization key, and optional texts/callbacks.

import { AuthInit } from 'uit-metro-universal-auth-library'; import 'uit-metro-universal-auth-library/dist/styles/main.css'; const initParams = { env: 'development', authorizationKey: process.env.AUTH_KEY ?? '', recaptchaKey: process.env.RECAPTCHA_KEY ?? '', texts: { registrationFormTitle: 'Зарегистрироваться' }, callbacks: { authModalOpened: () => console.log('Modal opened'), smsCodeSended: (request, response) => console.log('SMS sent', response), registrationCompleted: (request, response, formState) => { console.log('Registration completed', formState); } } }; const auth = new AuthInit(initParams); auth.init(); // start authentication flow
Debug
Known issues
breakingPackage is not available on npm publicly (scoped or private registry required).
fix
Ensure you have access to the private npm registry and are logged in with correct credentials.
affects: <1.0.0
gotchaAll strings and labels are in Russian; no i18n support provided.
fix
Override texts via the initParams.texts object; for other languages, you must provide translations.
affects: *
deprecatedThe default text values may change between minor versions without notice.
fix
Explicitly set all text fields in initParams to avoid unexpected UI changes.
affects: >=1.0.0
Errors
Common errors & fixes
ERR_MODULE_NOT_FOUND: Cannot find package 'uit-metro-universal-auth-library' imported from ...
Package not installed or missing from node_modules; also may be due to ESM-only resolution.
fix
Run `npm install uit-metro-universal-auth-library` and ensure your project uses ESM (e.g., `"type": "module"` in package.json).
TypeError: AuthInit is not a constructor
Wrong import style: default import attempted but package exports named export.
fix
Use `import { AuthInit } from 'uit-metro-universal-auth-library';` instead of `import AuthInit from ...`.
Module not found: Can't resolve 'uit-metro-universal-auth-library/dist/styles/main.css'
CSS file path is incorrect or missing side-effect import.
fix
Use `import 'uit-metro-universal-auth-library/dist/styles/main.css';` — no named import.
Upgrade
Version history
1.1.17latest on npm
Audit
Dependencies
google-recaptcha-v3requiredRequired for reCAPTCHA v3 verification; passed as recaptchaKey in initParams.
Agent activity
40 hits · last 30 days
node
30
OpenAI (training)
1
Resources
uit-metro-universal-auth-library — npm install uit-metro-universal-auth-library · libregistry