- @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
Full Guide: valapi.github.io
import { AuthClient } from "@valapi/auth";
const authClient = new AuthClient();
await authClient.login("BestUsername", "SuperSecretPassword");
Subject (PlayerUUID)
const subject = authClient.getSubject();
const authClient = await AuthClient.fromCookie(cookie);
Save
const authClient = AuthClient.fromJSON(oldAuthClient.toJSON());
if (Date.now() >= client.getExpirationDate()) {
await authClient.refresh();
}