{"id":18133,"library":"auth-js","title":"auth-js (e-city Auth Client)","description":"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.","status":"maintenance","version":"0.0.16","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","auth","auth-js"],"install":[{"cmd":"npm install auth-js","lang":"bash","label":"npm"},{"cmd":"yarn add auth-js","lang":"bash","label":"yarn"},{"cmd":"pnpm add auth-js","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Designed as a Vue plugin to be installed via Vue.use()","package":"vue","optional":false}],"imports":[{"note":"CommonJS only; no default ESM export. Use require for Node environments.","wrong":"import AuthJs from 'auth-js'","symbol":"AuthJs","correct":"const AuthJs = require('auth-js')"},{"note":"Must install via Vue.use() to properly integrate with Vue lifecycle.","wrong":"Vue.prototype.$auth = AuthJs({ baseURL })","symbol":"Vue plugin installation","correct":"const Auth = { install (Vue, options) { Vue.prototype.$auth = AuthJs(options) } }\nVue.use(Auth, { baseURL })"}],"quickstart":{"code":"const AuthJs = require('auth-js')\nconst baseURL = 'http://isse.paliari.com.br/app/rest'\nconst auth = AuthJs({\n  appModule: 'nfse',\n  baseURL,\n  statusBar: 'darken'\n})\nauth.signIn().then(response => {\n  console.log('signed in', response.token)\n}).catch(err => console.error(err))","lang":"javascript","description":"Demonstrates basic usage of auth-js with signIn method after initializing with configuration."},"warnings":[{"fix":"Manually create a .d.ts file or use `// @ts-ignore` for type safety.","message":"No TypeScript definitions provided; cannot use typed imports.","severity":"gotcha","affected_versions":"all"},{"fix":"Always attach .catch() to handle errors gracefully.","message":"Methods return promises but no error handling for network failures; promises may reject without clear messages.","severity":"breaking","affected_versions":"all"},{"fix":"Ensure the API is accessible and matches expected endpoints.","message":"The package relies on a hardcoded external API (http://isse.paliari.com.br/app/rest) — not configurable per instance beyond baseURL.","severity":"gotcha","affected_versions":"all"}],"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-js` or `yarn add auth-js` in your project root.","cause":"Package not installed or not in node_modules.","error":"Cannot find module 'auth-js'"},{"fix":"Use `const AuthJs = require('auth-js')` and ensure the variable name matches.","cause":"Using import statement instead of require, or incorrect capitalization.","error":"TypeError: AuthJs is not a constructor"},{"fix":"Install the plugin correctly: `Vue.use(Auth, { baseURL })` after defining Auth with install function.","cause":"Auth not properly installed via Vue.use().","error":"Uncaught (in promise) TypeError: Cannot read property 'signIn' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}