Metadata-Version: 2.1
Name: remoteauthclient
Version: 1.4.0b3
Summary: Client for Discord authorization via qr code
Home-page: https://github.com/RuslanUC/RemoteAuthClient
Author: RuslanUC
License: MIT
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography (>=3.4.7)
Requires-Dist: websockets (>=10.1)
Requires-Dist: aiohttp (>=3.8.1)

# RemoteAuthClient

### Installing
Python 3.7 or higher is required
```sh
pip install remoteauthclient
```

### Example
```py
from asyncio import run
from remoteauthclient import RemoteAuthClient

c = RemoteAuthClient()

@c.event("on_fingerprint")
async def on_fingerprint(data):
    print(f"Fingerprint: {data}")
    print(f"QrCode url: https://api.qrserver.com/v1/create-qr-code/?size=256x256&data={data}")

@c.event("on_userdata")
async def on_userdata(user):
    print(f"ID: {user.id}")
    print(f"Username: {user.username}")
    print(f"Discriminator: {user.discriminator}")
    print(f"Avatar hash: {user.avatar}")
    print(f"Name: {user.getName()}")
    print(f"Avatar URL: {user.getAvatarURL()}")

@c.event("on_token")
async def on_token(token):
    print(f"Token: {token}")

@c.event("on_cancel")
async def on_cancel():
    print(f"Auth canceled!")

@c.event("on_timeout")
async def on_timeout():
    print(f"Timeout")

@c.event("on_captcha")
async def on_captcha(captcha_data):
    # captcha_data contains captcha_sitekey, captcha_service (hcaptcha), captcha_rqdata and captcha_rqtoken
    print(f"Captcha!")
    captcha_key = ... # Solve captcha and get captcha_key, you must provide captcha_sitekey and captcha_rqdata to solving service
    return captcha_key

@c.event("on_error")
async def on_error(exc, client):
    print(f"Error: {exc.__class__.__name__}")
    if client.retries == 1:
        await client.run_task()

run(c.run())
```

# Proxy example
```py
from remoteauthclient import RemoteAuthClient

c = RemoteAuthClient(proxy="127.0.0.1:8080")
# Or with auth
c = RemoteAuthClient(proxy="127.0.0.1:8080", proxy_auth={"login": "user", "password": "password"})

...
```
