Auth0 SDK
Install, authenticate, and administer Auth0 with Effect-native Management API v2 operations.
Public package OpenAPI 3.1 451 operationsThe Auth0 SDK pins the official Management API v2 contract and keeps tenant addressing, bearer authentication, secret redaction, errors, and retries in the handwritten provider layer.
Install
npm install @kevinmichaelchen/distilled-auth0 effectpnpm add @kevinmichaelchen/distilled-auth0 effectbun add @kevinmichaelchen/distilled-auth0 effectAuthentication
| Variable | Purpose |
|---|---|
AUTH0_DOMAIN |
Tenant domain, such as acme.us.auth0.com |
AUTH0_MANAGEMENT_TOKEN |
Management API bearer token with the required scopes |
Quickstart
Find blocked users requiring support or security follow-up:
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
import * as FetchHttpClient from "effect/unstable/http/FetchHttpClient";
import {
CredentialsFromEnv,
getUsers,
} from "@kevinmichaelchen/distilled-auth0";
const Auth0Live = Layer.mergeAll(FetchHttpClient.layer, CredentialsFromEnv);
const program = getUsers({
q: "blocked:true",
search_engine: "v3",
fields: "user_id,email,blocked,last_login",
include_fields: true,
per_page: 50,
});
const users = await Effect.runPromise(Effect.provide(program, Auth0Live));