Skip to main content

Auth0 Token Vault credential provider for the Model Context Standard.

Project description

mcs-auth-auth0

One credential. Every service. Auth0 Token Vault integration for the Model Context Standard (MCS).

Configure Gmail, Google Drive, Slack, GitHub, and Microsoft connections once in the Auth0 dashboard. Your agent accesses all of them through a single get_token(scope) call. No separate OAuth clients, no per-service credential management, no token refresh headaches.

Installation

pip install mcs-auth-auth0

Quick start

from mcs.auth.auth0 import Auth0Provider

provider = Auth0Provider(
    domain="my-tenant.auth0.com",
    client_id="...",
    client_secret="...",
    refresh_token="...",  # from auth setup or AuthPort connector
)

# One call -- Auth0 handles the Token Vault exchange (RFC 8693)
google_token = provider.get_token("gmail")
slack_token = provider.get_token("slack")
github_token = provider.get_token("github")

How it works

Your Agent                  Auth0 Token Vault         External Provider
    |                            |                          |
    |-- get_token("gmail") ----->|                          |
    |                            |-- RFC 8693 exchange ---->|
    |                            |<--- Google access token -|
    |<-- "ya29.a0..." ----------|                          |

The Auth0Provider exchanges an Auth0 refresh token for an external provider's access token via Token Vault. It doesn't know how the refresh token was obtained -- that's pluggable via AuthPort:

from mcs.auth.auth0 import Auth0Provider
from mcs.auth.oauth import OAuthConnector        # browser login
from mcs.auth.linkauth import LinkAuthConnector  # device-flow broker

# Browser-based login
provider = Auth0Provider(..., _auth=OAuthConnector(...))

# LinkAuth device-flow (no browser callback needed)
provider = Auth0Provider(..., _auth=LinkAuthConnector(...))

Built-in scope mapping

MCS scope Auth0 connection
gmail, google, google-drive, google-calendar google-oauth2
slack slack
github github
microsoft windowslive

Custom mappings: Auth0Provider(..., connections={"myservice": "my-connection"})

Links

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcs_auth_auth0-0.4.1.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcs_auth_auth0-0.4.1-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file mcs_auth_auth0-0.4.1.tar.gz.

File metadata

  • Download URL: mcs_auth_auth0-0.4.1.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for mcs_auth_auth0-0.4.1.tar.gz
Algorithm Hash digest
SHA256 276ba27fd3594d27b9fb2b16c2d8b8207b2d21b81c7e706a3bc6c00b7398e278
MD5 0482ce64edd5fcc56d965392b4a8516c
BLAKE2b-256 11a24970aa1d397c3efd6c3d33245db3c4269d211e22646255d9d4a2d17229b1

See more details on using hashes here.

File details

Details for the file mcs_auth_auth0-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: mcs_auth_auth0-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for mcs_auth_auth0-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c9bf4a7a56b04252495023fcdd7d10be6e2ebdfdd0621f55e7d05bdc09e551d1
MD5 9e66b478c33fd06aa5fb31ea8bed351d
BLAKE2b-256 00b7379962fd1a6b5116137eb2d465979a5f458d3ffe225281adf0b79cda73c4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page