- @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
NPM:
npm install @valapi/auth
PNPM:
pnpm add @valapi/auth
import { Auth } from "@valapi/auth";
const auth = new Auth();
This is only an example function
const data = await auth.captcha();
const captchaResponse = await getCaptchaResponse(data); // P1_eyJ...
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();
}