made with  ♥  by 

Getting Started

Install using npm and save it as a dependency.

Install

From CDN

<script src="https://cdn.jsdelivr.net/npm/aspnet-auth"></script>

From npm

npm install aspnet-auth --save

Initialize

const aspnetAuth = new AspnetAuth({
  url: 'http://your-domain-name',
});

Usage

register

aspnetAuth.register('email@email.com', 'SomePassword', 'SomePassword').then((result) => {
  // returns result.status = 200 on success
  done();
})
  .catch((err) => {
    console.log(err);
  });

login

aspnetAuth.login('email@email.com', 'SomePassword').then((result) => {
  // returns result.status = 200 on success
  done();
})
  .catch((err) => {
    console.log(err);
  });