azuriom-auth

A JavaScript implementation of the Azuriom Auth API.

Usage no npm install needed!

<script type="module">
  import azuriomAuth from 'https://cdn.skypack.dev/azuriom-auth';
</script>

README

AzAuth JS

Tests Language grade npm Version Chat

A JavaScript implementation made in TypeScript of the Azuriom Auth API.

Installation

npm install azuriom-auth

Usage

const AzuriomAuth = require('azuriom-auth');

async function login(email, password) {
  const authenticator = new AzuriomAuth.Authenticator('<url of your website>');

  try {
    const user = await authenticator.auth(email, password);

    console.log(`Logged in with ${user.email}`);
  } catch (e) {
    console.log(e);
  }
}