Registry / auth-security / auth-js

auth-js

JSON →
library0.0.16jsnpmunverified

A Vue.js plugin for authentication on the e-city platform, providing methods for sign-in, sign-out, password update, account management, image upload, address management, module permissions, and fetching current user info. Currently at version 0.0.16, with no stable release cadence. It is tightly coupled to a specific backend (http://isse.paliari.com.br/app/rest) and requires a Promise polyfill for older browsers. Not actively maintained; limited documentation and no TypeScript support.

npm install auth-js
INSTALL
IMPORT
SIG · AUTH-JS
A
auth-js
auth-securityjavascriptv0.0.16
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.

AuthJs
const AuthJs = require('auth-js')
import AuthJs from 'auth-js'
CommonJS only; no default ESM export. Use require for Node environments.
Vue plugin installation
const Auth = { install (Vue, options) { Vue.prototype.$auth = AuthJs(options) } } Vue.use(Auth, { baseURL })
Vue.prototype.$auth = AuthJs({ baseURL })
Must install via Vue.use() to properly integrate with Vue lifecycle.

Demonstrates basic usage of auth-js with signIn method after initializing with configuration.

const AuthJs = require('auth-js') const baseURL = 'http://isse.paliari.com.br/app/rest' const auth = AuthJs({ appModule: 'nfse', baseURL, statusBar: 'darken' }) auth.signIn().then(response => { console.log('signed in', response.token) }).catch(err => console.error(err))
Debug
Known issues
gotchaNo TypeScript definitions provided; cannot use typed imports.
fix
Manually create a .d.ts file or use `// @ts-ignore` for type safety.
affects: all
breakingMethods return promises but no error handling for network failures; promises may reject without clear messages.
fix
Always attach .catch() to handle errors gracefully.
affects: all
gotchaThe package relies on a hardcoded external API (http://isse.paliari.com.br/app/rest) — not configurable per instance beyond baseURL.
fix
Ensure the API is accessible and matches expected endpoints.
affects: all
Errors
Common errors & fixes
Cannot find module 'auth-js'
Package not installed or not in node_modules.
fix
Run `npm install auth-js` or `yarn add auth-js` in your project root.
TypeError: AuthJs is not a constructor
Using import statement instead of require, or incorrect capitalization.
fix
Use `const AuthJs = require('auth-js')` and ensure the variable name matches.
Uncaught (in promise) TypeError: Cannot read property 'signIn' of undefined
Auth not properly installed via Vue.use().
fix
Install the plugin correctly: `Vue.use(Auth, { baseURL })` after defining Auth with install function.
Upgrade
Version history
0.0.16latest on npm
Audit
Dependencies
vuerequiredDesigned as a Vue plugin to be installed via Vue.use()
Agent activity
39 hits · last 30 days
node
32
OpenAI (training)
1
Resources
auth-js — npm install auth-js · libregistry