Skip to main content
Use oauth(...) when you want Redop to discover the authorization server metadata for an issuer and validate bearer tokens against that issuer’s JWKS.

Example

import { oauth, Redop } from "@redopjs/redop";

new Redop({ serverInfo: { name: "oauth-demo" } }).use(
  oauth({
    issuer: "https://auth.example.com",
    audience: "my-mcp-server",
    requiredScopes: ["tools:read"],
  }),
);
The discovery document and JWKS are cached automatically.

See also