download
raw
749 Bytes
import { OAuth2Client, CodeChallengeMethod } from "../client.js";
const authorizationEndpoint = "https://lichess.org/oauth";
const tokenEndpoint = "https://lichess.org/api/token";
export class Lichess {
client;
constructor(clientId, redirectURI) {
this.client = new OAuth2Client(clientId, null, redirectURI);
}
createAuthorizationURL(state, codeVerifier, scopes) {
const url = this.client.createAuthorizationURLWithPKCE(authorizationEndpoint, state, CodeChallengeMethod.S256, codeVerifier, scopes);
return url;
}
async validateAuthorizationCode(code, codeVerifier) {
const tokens = await this.client.validateAuthorizationCode(tokenEndpoint, code, codeVerifier);
return tokens;
}
}

Xet Storage Details

Size:
749 Bytes
·
Xet hash:
ac2480ba51b66822e8b704bf13425125f529be24358f9d95c08e7769e5cd1fff

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.