sandbox-pokhara / league-client

league-client is a python package to communicate with riot servers
MIT License
27 stars 11 forks source link

what is userinfo_token how to get? #51

Closed rlaehgus12123 closed 1 month ago

rlaehgus12123 commented 2 months ago

how to get "userinfo_token"?

pradishb commented 1 month ago
from league_client.rso.auth import login_using_credentials
from league_client.rso.auth import process_access_token
from league_client.rso.userinfo import get_userinfo

def captcha_solver(rqdata: str, sitekey: str) -> str:
    ...
    ...
    return "P1..."

(
    ssid,
    clid,
    access_token,
    scope,
    iss,
    id_token,
    token_type,
    session_state,
    expires_in,
) = login_using_credentials(
    "username",
    "password",
    captcha_solver,
)

print("access_token", access_token)
puuid, region, account_id = process_access_token(access_token)
print("puuid, region, account_id", puuid, region, account_id)
userinfo = get_userinfo(access_token)
print("userinfo", userinfo)

We don't have a reliable captcha solver right now.