@deploybaseline/auth0
v0.14.0
Published
Auth0 emulator: OIDC discovery and JWKS, `/authorize` with Universal Login and sessions, the token endpoint (authorization code with PKCE, refresh with rotation, client credentials, password), userinfo, revoke, database signup and change password, both lo
Readme
@deploybaseline/auth0
Auth0 emulator: OIDC discovery and JWKS, /authorize with Universal Login and sessions, the token endpoint (authorization code with PKCE, refresh with rotation, client credentials, password), userinfo, revoke, database signup and change password, both logout endpoints, and the Management API v2 (users with search, roles and permissions, clients, client grants, resource servers, connections, sessions, refresh tokens), with role based access control in tokens. openid-client and the auth0 SDK's ManagementClient work unchanged.
Part of Baseline: local drop-in replacement services for CI and no-network sandboxes.
Usage
npx @deploybaseline/cli start --service auth0import { createEmulator } from "@deploybaseline/cli";
const auth0 = await createEmulator({ service: "auth0" });
// Point your SDK at auth0.url
await auth0.close();import * as client from "openid-client";
// The issuer is the emulator URL with a trailing slash, as Auth0's is.
const config = await client.discovery(new URL(`${auth0.url}/`), "baseline-web-app", "baseline-web-secret", undefined, {
execute: [client.allowInsecureRequests],
});Documentation
- Auth0 docs: routes, token claims, refresh token rotation, the Management API and user search, role based access control, error bodies, seed config, using the
auth0SDK with a customfetch, and current limits - API reference:
http://localhost:3999/docs/auth0while the CLI runs (how it works)
License
Apache-2.0
