Git Product home page Git Product logo

python-riot-auth's People

Contributors

ev3nvy avatar floxay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

python-riot-auth's Issues

invalid_session_id

Hello, good project, I have a small problem, for some reason when I authenticate it returns the Post:

{"type":"error","error":"invalid_session_id","country":"co"}

Any idea what field I'm missing from the body?

body = { "acr_values": "", "claims": "", "client_id": "riot-client", "code_challenge": "", "code_challenge_method": "", "nonce": token_urlsafe(16), "redirect_uri": "http://localhost/redirect", "response_type": "token id_token", "scope": "openid link ban lol_region account", }

403 error

Hi, it gives 403 Forbidden error. I'm using latest Riot Client user agent also tried with different IP's still same error.

SSL Certificate Error

aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host auth.riotgames.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)')]

I get this error when trying to run await auth.authorize(*CREDS)

Riot_auth error

import riot_auth
ModuleNotFoundError: No module named 'riot_auth' what can i do? i try pip install riot_auth but i got this error "ERROR: Could not find a version that satisfies the requirement riot_auth (from versions: none)
ERROR: No matching distribution found for riot_auth"

Still the 403 error exists

I am getting the 403 error while hosting..

%Ignoring exception in command login:
#Traceback (most recent call last):
`  File "/usr/local/lib/python3.10/site-packages/discord/commands/core.py", line 126, in wrapped
    ret = await coro(arg)
`  File "/usr/local/lib/python3.10/site-packages/discord/commands/core.py", line 852, in _invoke
1    await self.callback(self.cog, ctx, **kwargs)
U  File "/home/user_556182600524234793/commands/commands/login.py", line 32, in login
:    userData = await username_to_data(username, password)
i  File "/home/user_556182600524234793/commands/commands/utils/shopData.py", line 19, in username_to_data
!    await auth.authorize(*CREDS)
[  File "/usr/local/lib/python3.10/site-packages/riot_auth/auth.py", line 192, in authorize
    async with session.post(
]  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1138, in __aenter__
"    self._resp = await self._coro
Z  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 640, in _request
    resp.raise_for_status()
j  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1004, in raise_for_status
    raise ClientResponseError(
�aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://auth.riotgames.com/api/v1/authorization')

EThe above exception was the direct cause of the following exception:

#Traceback (most recent call last):
i  File "/usr/local/lib/python3.10/site-packages/discord/bot.py", line 993, in invoke_application_command
"    await ctx.command.invoke(ctx)
_  File "/usr/local/lib/python3.10/site-packages/discord/commands/core.py", line 357, in invoke
    await injected(ctx)
`  File "/usr/local/lib/python3.10/site-packages/discord/commands/core.py", line 134, in wrapped
6    raise ApplicationCommandInvokeError(exc) from exc
�discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: ClientResponseError: 403, message='Forbidden', url=URL('https://auth.riotgames.com/api/v1/authorization')

Hi man is not work any more how to fix this problem, can u help me pls😭

D:\project2\python-riot-auth-main\python-riot-auth-main\examples>python example_auth_argv.py "username" "password"
Traceback (most recent call last):
File "D:\project2\python-riot-auth-main\python-riot-auth-main\examples\example_auth_argv.py", line 19, in
asyncio.run(auth.authorize(*CREDS))
File "D:\Python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "D:\Python311\Lib\site-packages\riot_auth\auth.py", line 217, in authorize
async with session.put(
File "D:\Python311\Lib\site-packages\aiohttp\client.py", line 1141, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\site-packages\aiohttp\client.py", line 643, in _request
resp.raise_for_status()
File "D:\Python311\Lib\site-packages\aiohttp\client_reqrep.py", line 1005, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://auth.riotgames.com/api/v1/authorization')

How to change account password?

Hello. I do PUT account.riotgames.com/api/account/v1/user/password however the api returns me 403 Unauthorized. Tell me, please, how to make request with token?

Encounter undefined symbol: SSL_CTX_set_ciphersuites Error at CentOS7.6

import riot_auth

async def authflow(user: str, passwd: str):
    CREDS = user, passwd
    auth = riot_auth.RiotAuth()
    await auth.authorize(*CREDS)
    await auth.reauthorize()
    # Reauth using cookies. Returns a bool indicating whether the reauth attempt was successful.
    await auth.reauthorize()
    # print(f"Access Token Type: {auth.token_type}\n")
    # print(f"Access Token: {auth.access_token}\n")
    # print(f"Entitlements Token: {auth.entitlements_token}\n")
    # print(f"User ID: {auth.user_id}")
    return auth

My code run perfect at windows11,but encounter this error at CentOS7.6

python3 vesion 3.9.5

error handling command: login
Traceback (most recent call last):
  File "/home/muxue/kook/bot/lib/python3.9/site-packages/khl/command/command.py", line 87, in handle
    await self.execute(msg, *args)
  File "/home/muxue/kook/bot/lib/python3.9/site-packages/khl/command/command.py", line 119, in execute
    await self.handler(*args)
  File "/home/muxue/kook/val_bot/code/main.py", line 731, in login_authtoekn
    res_auth = await authflow(user, passwd)
  File "/home/muxue/kook/val_bot/code/val.py", line 196, in authflow
    auth = riot_auth.RiotAuth()
  File "/home/muxue/kook/bot/lib/python3.9/site-packages/riot_auth/auth.py", line 78, in __init__
    self._auth_ssl_ctx = RiotAuth.create_riot_auth_ssl_ctx()
  File "/home/muxue/kook/bot/lib/python3.9/site-packages/riot_auth/auth.py", line 110, in create_riot_auth_ssl_ctx
    libssl.SSL_CTX_set_ciphersuites(ssl_ctx_addr, RiotAuth.CIPHERS13.encode())
  File "/usr/local/python3/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__
    func = self.__getitem__(name)
  File "/usr/local/python3/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/local/python3/lib/python3.9/lib-dynload/_ssl.cpython-39-x86_64-linux-gnu.so: undefined symbol: SSL_CTX_set_ciphersuites

Someone told me this is a Path problem, or SSL library version does not correspond. How can I fix that?

403 Forbidden from authorization

I encountered the following error

Traceback (most recent call last):
 File "E:\GIT\Kook-Valorant-Bot\code\main.py", line 1760, in login_authtoken
   res_auth = await authflow(user, passwd)
 File "E:\GIT\Kook-Valorant-Bot\code\val.py", line 152, in authflow
   await auth.authorize(*CREDS)
 File "C:\Users\moth\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\riot_auth\auth.py", line 192, in authorize
   async with session.post(
 File "C:\Users\moth\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\aiohttp\client.py", line 1138, in __aenter__
   self._resp = await self._coro
 File "C:\Users\moth\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\aiohttp\client.py", line 640, in _request
   resp.raise_for_status()
 File "C:\Users\moth\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\aiohttp\client_reqrep.py", line 1004, in raise_for_status
   raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://auth.riotgames.com/api/v1/authorization')

It occured both on windows11 and cloud_server CentOS7.6

first err occured at 2022-09-27 00:02:47 GMT+8, everything was good on 09-26

image

I asked another developer, who said he had encountered the same error

For the recorded, I also open the same issue at techchrism/valorant-api-docs/issues/13

502 bad gateway

I used it the first time, and when I used it the second time I still got this error. How to fix this error? Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.