☁️ Universal OAuth Bridge

Deploy this once and use it for all your Google Drive bots. No database required on the bridge side.

🚀 Developer Guide

1. Construct the State

Create a JSON object with your internal user ID (u) and your bot's webhook URL (r).

{ "u": "user_123", "r": "https://mybot.com/api/tokens" }

Base64 encode this JSON string to use in the URL.

2. Redirect the User

Send your user to this service's auth endpoint:

http://oauth.arshman.me/start-auth?state=BASE64_STRING

3. Receive Tokens (Webhook)

After the user signs in, this service will POST a JSON payload to your return_url:

{
    "status": "success",
    "user_id": "user_123",
    "email": "user@gmail.com",
    "credentials": {
        "access_token": "ya29...",
        "refresh_token": "1//...",
        "expires_at": 1713600000.0
    }
}

🛠️ Manual Token Generator

Generate tokens independently for testing or manual database entry.