Metadata-Version: 2.4
Name: tspscale-login
Version: 1.0.2
Summary: Official Python SDK for TSP Scale OAuth Login
Author: TSP Scale
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.25.1
Dynamic: author
Dynamic: description
Dynamic: description-content-type
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# tspscale-login

Official Python SDK for TSP Scale Authentication.

🚀 Quick Start (Zero-Config)
-----------------------------
Verify TSP Scale OAuth 2.0 access tokens securely in your Python backends (Django, Flask, FastAPI).

### Installation
```bash
pip install tspscale-login
```

🛠️ Usage
---------
You can use the `TSPClient` to securely exchange a token for the user's TSP Scale profile.

```python
from tspscale_login import TSPClient, TSPAuthException

# Initialize the client
client = TSPClient()

def verify_user_login(access_token):
    try:
        # Calls the TSP Scale API to securely verify the token
        user_profile = client.verify_token(access_token)
        
        print(f"Logged in as: {user_profile['email']}")
        return user_profile
        
    except TSPAuthException as error:
        print(f"Authentication failed: {str(error)}")
        return None
```
