Skip to content

Repository files navigation

AzAuth JS

Node.js CInpm VersionChat

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

Installation

npm install azuriom-auth

Usage

import{AuthClient}from'azuriom-auth'asyncfunctionlogin(email,password){constclient=newAuthClient('<url of your website>')letresult=awaitclient.login(email,password)if(result.status==='pending'&&result.requires2fa){consttwoFactorCode='<two factor code>'// IMPORTANT: Replace with the 2FA user temporary coderesult=awaitclient.login(email,password,twoFactorCode)}if(result.status!=='success'){throw'Unexpected result: '+JSON.stringify(result)}returnresult}

About

A JavaScript implementation of the Azuriom Auth API.

Resources

Security policy

Stars

3 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages