Metadata-Version: 2.1
Name: recnetlogin
Version: 0.0.1
Summary: RecNetLogin is a Python package that allows you to acquire your RecNet bearer token and more with your account credentials!
Author: Jegarde
Project-URL: Homepage, https://github.com/Jegarde/RecNet-Login
Project-URL: Bug Tracker, https://github.com/Jegarde/RecNet-Login/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt

# RecNet-Login
This is a Python package that allows you to acquire your [RecNet](https://rec.net/) bearer token and more with your account credentials!
This is the rewritten version! For the older version, [visit the legacy branch.](https://github.com/Jegarde/RecNet-Login/tree/legacy)

# Features
- Automatically renewing token
- Supports 2FA accounts
- Decoding the bearer token
- Detailed exceptions

# Installation
Done via [git](https://git-scm.com):
```py
python -m pip install -U git+https://github.com/Jegarde/RecNet-Login.git#egg=recnetlogin
```

# Usage
Check the [`examples`](https://github.com/Jegarde/RecNet-Login/tree/main/examples) folder for useful examples to get started with the package.

# Alternative ways of getting your bearer token
- Run this JS script on your browser's DevTools console.
```js
url = window.location.href
if (url.includes("rec.net")) {
   try {
    b_token = "Bearer " + JSON.parse(localStorage.getItem("oidc.user:https://auth.rec.net:recnet"))["access_token"]
    console.log(b_token)
    alert("Successfully printed bearer token on console!")
    }
    catch(err) {
        alert("Not logged in on RecNet!")
    } 
}
else {
    alert("Not in rec.net")
}
```
- Generate from cookie

[Rec Room API Tool Box](https://github.com/zigzatuzoo/Rec-Room-API-Tool-Box/blob/main/Tools/RRAutoAuth.py) made by [zigzatuzoo](https://github.com/zigzatuzoo)
