@valapi/auth
TypeScript icon, indicating that this package has built-in type declarations

5.0.0-beta.3 • Public • Published

Valorant API - Authentication

Profile

Valorant Authentication

Downloads install size Known Vulnerabilities

LICENSE Github Discord

Documentation: valapi.github.io/docs

Guide: valapi.github.io/guide


  • @valapi/auth isn't endorsed by Riot Games and doesn't reflect the views or opinions of Riot Games or anyone officially involved in producing or managing Riot Games properties. Riot Games, and all associated properties are trademarks or registered trademarks of Riot Games, Inc.
  • @valapi/auth was created under Riot Games' "Legal Jibber Jabber" policy using assets owned by Riot Games. Riot Games does not endorse or sponsor this project.
  • MIT License

Installation

NPM:

npm install @valapi/auth

PNPM:

pnpm add @valapi/auth

Guide

import { Auth } from "@valapi/auth";
const auth = new Auth();

Captcha

This is only an example function

const data = await auth.captcha();

const captchaResponse = await getCaptchaResponse(data); // P1_eyJ...

Auth

await auth.login({
    username: "BestUsername",
    password: "SuperSecretPassword",
    captcha: captchaResponse
});
if (auth.isMultifactor) {
    const loginCode = 428793;

    await auth.multifactor(loginCode);
}

Subject (PlayerUUID)

const subject = auth.subject;

Serialize

const auth = new Auth({ user: oldAuth.toJSON() });

if (!auth.isAuthenticated) {
    await auth.reauthorize();
}

Dependencies (5)

Dev Dependencies (1)

Package Sidebar

Install

npm i @valapi/auth

Weekly Downloads

15

Version

5.0.0-beta.3

License

MIT

Unpacked Size

30.2 kB

Total Files

14

Last publish

Collaborators

  • ing3kth