Index of every page on this site: llms.txt
All skills
auth0 avatar

/auth0

@7b3821d official
by auth0auth0/agent-skills54 stars
30
Run it yourself

Use when adding, fixing, or improving how an app authenticates users or protects an API, or when using or configuring any Auth0 feature — signing users in and out, sessions and tokens, guarding routes and endpoints, MFA, passwordless passkey login (WebAuthn), SSO, Organizations, RBAC, custom domains, Universal Portals for hosted account and organization self-service, or Universal Login branding. Also use to audit a tenant's health, security, and plan fit (CheckMate), to debug why an auth flow fails, to migrate from another auth provider, or to set up the Vercel native integration. Covers any web, mobile, or backend framework and every Auth0 SDK, tool, and API. Use even if the user never mentions Auth0.

Use this Skill: https://skilld.dev/gh/auth0/agent-skills/auth0

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesfeature-mfaauth0-api-python.md

≈847 tokens on demand. Your agent reads this file only when SKILL.md points to it.

auth0-api-python — MFA (API-side scope gate)

Minimum version: auth0-api-python>=1.0.0b10. Only 1.0.0 pre-releases are published (1.0.0b1–1.0.0b10); there is no stable release yet, so install with a pre-release-aware spec (e.g. pip install "auth0-api-python>=1.0.0b10" or --pre).

Framework-specific surface only. The shared mechanic, tenant config, amr/error tables, and MFA API endpoints live in the shared MFA reference. This is a resource-server SDK: it does not run MFA. The tenant issues the step-up scope (e.g. transfer:funds) only after the user completes MFA, and the API's job is to enforce that a caller lacking that scope is rejected.

Import:

from auth0_api_python import ApiClient, ApiClientOptions, VerifyAccessTokenError

Instantiate with domain and audience from environment variables — never hardcoded in source:

client = ApiClient(
    ApiClientOptions(
        domain=AUTH0_DOMAIN,
        audience=AUTH0_AUDIENCE,
    )
)

Token verification:

  • await client.verify_access_token(access_token) → decoded claims dict. Raises VerifyAccessTokenError on invalid/expired token.
  • await client.verify_request(headers) → same; extracts the bearer token from headers["authorization"] automatically.

Both methods are async — always await them. On error, VerifyAccessTokenError.get_status_code() returns 401.

Scope gate pattern. The step-up scope (transfer:funds) is a value inside the scope claim string, space-delimited. Split and check:

scopes = claims.get("scope", "").split()
if "transfer:funds" not in scopes:
    return JSONResponse({"error": "insufficient_scope"}, status_code=403)

Do NOT use required_claims for scope value enforcement. required_claims only checks that the listed key exists in the claims dict — it does not validate the claim's value. required_claims=["scope"] passes if the scope key is present with any value (including an empty string). required_claims=["transfer:funds"] checks whether "transfer:funds" is a key in the claims dict (which it never is), not whether it appears in the scope string. The correct approach is string-splitting as shown above.

Gate on POST /api/transfers (FastAPI example):

from fastapi import FastAPI, Header, HTTPException
from auth0_api_python import ApiClient, ApiClientOptions, VerifyAccessTokenError

app = FastAPI()
client = ApiClient(ApiClientOptions(domain=AUTH0_DOMAIN, audience=AUTH0_AUDIENCE))

@app.post("/api/transfers")
async def transfer_funds(authorization: str = Header(...)):
    try:
        claims = await client.verify_request({"authorization": authorization})
    except VerifyAccessTokenError as e:
        raise HTTPException(status_code=e.get_status_code(), detail="Unauthorized")

    scopes = claims.get("scope", "").split()
    if "transfer:funds" not in scopes:
        raise HTTPException(status_code=403, detail="insufficient_scope")

    # proceed with transfer logic
    return {"status": "ok"}

Apply the transfer:funds gate only to the sensitive endpoint — leave GET /api/balance requiring only read:balance (no MFA step-up needed).

Note: the SDK's own EXAMPLES.md covers verify_access_token and verify_request usage, but this file remains the authoritative reference for the MFA scope-gate pattern.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts7d3 checks · Risk SAFE
  • Gen Agent Trust Hub7d

    The skill is a professional tool for Auth0 integration. It features a tenant audit workflow that processes external website data, creating a potential surface for indirect prompt injection. It also automates the installation of official Auth0 tools from trusted sources.

  • Socket7d

    No alerts

  • Snyk7d

    Risk: LOW · No issues

Signed by skilld at 7b3821d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated last week
Other metadata
metadata
{
  "author": "Auth0 <support@auth0.com>",
  "version": "2.6.0",
  "openclaw": {
    "emoji": "🔐",
    "homepage": "https://github.com/auth0/agent-skills",
    "requires": {
      "bins": [
        "auth0"
      ]
    },
    "os": [
      "darwin",
      "linux"
    ],
    "install": [
      {
        "id": "brew",
        "kind": "brew",
        "formula": "auth0",
        "bins": [
          "auth0"
        ],
        "label": "Install Auth0 CLI (brew)"
      }
    ]
  }
}

README badge

README badge for auth0/agent-skills