{"id":19525973,"url":"https://github.com/azuriom/azauthjs","last_synced_at":"2025-04-26T10:31:03.835Z","repository":{"id":115588625,"uuid":"290845856","full_name":"Azuriom/AzAuthJS","owner":"Azuriom","description":"A JavaScript implementation of the Azuriom Auth API.","archived":false,"fork":false,"pushed_at":"2024-05-13T20:49:10.000Z","size":113,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-14T08:18:41.229Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://azuriom.com/docs/api-auth","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Azuriom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-27T17:57:57.000Z","updated_at":"2024-05-13T20:49:14.000Z","dependencies_parsed_at":"2023-07-25T21:00:55.666Z","dependency_job_id":null,"html_url":"https://github.com/Azuriom/AzAuthJS","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"40b6f1c4f89575321263be37b90f4d8e388caf92"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azuriom%2FAzAuthJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azuriom%2FAzAuthJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azuriom%2FAzAuthJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azuriom%2FAzAuthJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Azuriom","download_url":"https://codeload.github.com/Azuriom/AzAuthJS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224032231,"owners_count":17244373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T01:07:49.067Z","updated_at":"2024-11-11T01:07:50.457Z","avatar_url":"https://github.com/Azuriom.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AzAuth JS\n\n[![Node.js CI](https://img.shields.io/github/actions/workflow/status/Azuriom/AzAuthJS/tests.yml?branch=master\u0026style=flat-square)](https://github.com/Azuriom/AzAuthJS/actions/workflows/tests.yml)\n[![npm Version](https://img.shields.io/npm/v/azuriom-auth.svg?style=flat-square)](https://www.npmjs.org/package/azuriom-auth)\n[![Chat](https://img.shields.io/discord/625774284823986183?color=5865f2\u0026label=Discord\u0026logo=discord\u0026logoColor=fff\u0026style=flat-square)](https://azuriom.com/discord)\n\nA JavaScript implementation made in [TypeScript](https://www.typescriptlang.org/) of the [Azuriom Auth API](https://azuriom.com/docs/api-auth).\n\n## Installation\n\n```\nnpm install azuriom-auth\n```\n\n## Usage\n\n```js\nimport { AuthClient } from 'azuriom-auth'\n\nasync function login(email, password) {\n  const client = new AuthClient('\u003curl of your website\u003e')\n\n  let result = await client.login(email, password)\n\n  if (result.status === 'pending' \u0026\u0026 result.requires2fa) {\n    const twoFactorCode = '\u003ctwo factor code\u003e' // IMPORTANT: Replace with the 2FA user temporary code\n\n    result = await client.login(email, password, twoFactorCode)\n  }\n\n  if (result.status !== 'success') {\n    throw 'Unexpected result: ' + JSON.stringify(result)\n  }\n\n  return result\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazuriom%2Fazauthjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazuriom%2Fazauthjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazuriom%2Fazauthjs/lists"}