@ecomplus/auth

1.0.1 • Public • Published

E-Com Plus Auth

Publish CodeFactor npm version License AGPL

JS client for E-Com Plus admin authentication

CHANGELOG

Usage

The @ecomplus/auth package can be used to handle login and persist/manipulate admin account data and resources permitted trough E-Com Plus Store API.

It's available for both Node.js and browser environments.

Example

import ecomAuth from '@ecomplus/auth'

ecomAuth.login(localStorage.getItem('username'), localStorage.getItem('password'))

ecomAuth.on('login', self => {
  console.log('Login OK!', self)
  ecomAuth.createEcomplusSession().then(r => console.log(r))
})

ecomAuth.on('logout', self => {
  console.log('Out!', self)
})

Package Sidebar

Install

npm i @ecomplus/auth

Weekly Downloads

1

Version

1.0.1

License

AGPL-3.0

Unpacked Size

819 kB

Total Files

32

Last publish

Collaborators

  • leomp12