Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Auth JS Client for e-city
yarn add auth-js
npm i --save auth-js
import AuthJs, {TokenManager} from 'auth-js'
const baseURL = 'http://isse.paliari.com.br/app/rest'
const Auth = {
install (Vue, {TokenManager, baseURL}) {
const auth = AuthJs({tokenManager:TokenManager, appModule: 'nfse', baseURL, statusBar: 'darken'})
Vue.prototype.$auth = auth
Vue.auth = auth
}
}
Vue.use(Auth, {TokenManager, baseURL})
Or with Cookie
import AuthJs, {CookieManager} from 'auth-js'
const baseURL = 'http://isse.paliari.com.br/app/rest'
const Auth = {
install (Vue, {CookieManager, baseURL}) {
const auth = AuthJs({tokenManager:CookieManager, appModule: 'nfse', baseURL, statusBar: 'default'})
Vue.prototype.$auth = auth
Vue.auth = auth
}
}
Vue.use(Auth, {CookieManager, baseURL})
All methods return the Promise instance.
this.$auth.signIn().then( response => {
// the response contains token and usuario e.g: {token: {...}, usuario: {...}}
console.log('success', response)
})
.catch( e => {
console.log('error', e)
})
Sign out current session of user.
this.$auth.signOut().then( response => {
console.log('success', response)
})
.catch( e => {
console.log('error', e)
})
Update current passowrd of user.
this.$auth.updatePassword().then( response => {
console.log('success', response)
})
.catch( e => {
console.log('error', e)
})
Update account of user.
this.$auth.account().then( response => {
console.log('success', response)
})
.catch( e => {
console.log('error', e)
})
Change image of perfil the user.
this.$auth.image().then( response => {
console.log('success', response)
})
.catch( e => {
console.log('error', e)
})
Update address of user.
this.$auth.address().then( response => {
console.log('success', response)
})
.catch( e => {
console.log('error', e)
})
Insert/Remove modules of user.
this.$auth.modules().then( response => {
console.log('success', response)
})
.catch( e => {
console.log('error', e)
})
Get current user.
this.$auth.current().then( response => {
console.log('success', response)
})
.catch( e => {
console.log('error', e)
})
This project is licensed under MIT License
FAQs
Auth JS Client for e-city
The npm package auth-js receives a total of 15 weekly downloads. As such, auth-js popularity was classified as not popular.
We found that auth-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.