← ClaudeAtlas

auth0-testslisted

Use when an app uses Auth0 and needs tests for its tenant config, login flows or Action scripts: per-PR or namespaced tenants, Universal Login, PKCE, client credentials, Rules and Hooks, and config drift with a0deploy. Generic OAuth flows are oauth-flow-test-author.
testland/qa-skills · ★ 0 · Testing & QA · score 72
Install: claude install-skill testland/qa-skills
# auth0-tests ## Overview Tests against an Auth0 tenant fall into three layers: 1. **Tenant-level config** - connections, clients, APIs, tenants themselves; tested via Auth0 Deploy CLI for env parity. 2. **Auth flow** - tested by exercising the OIDC endpoints from the application against a dev tenant. 3. **Custom serverless code** - Actions (current), Rules + Hooks (legacy); unit-tested in Node.js with the Auth0 SDK mocks. ## When to use - The repo uses Auth0 as IdP. - The team has multiple environments (dev / staging / prod) needing config parity. - Custom Actions / Rules need unit-test coverage. - Auth flow regression suites need to run pre-deploy. ## How to use 1. Pick a tenant strategy (Step 1): per-PR tenant for tenant-config tests, mocked OIDC for fast app-side flow tests. 2. Export the source tenant with `a0deploy` and commit the YAML as fixtures for the config-drift check (Step 2). 3. Exercise the OIDC token endpoint for the grants the app uses - client-credentials for M2M, Universal Login via Playwright for interactive flows (Step 3). 4. Unit-test each Action handler by calling `onExecutePostLogin` with a stub `api` and asserting on `api.access.deny` (Step 4); apply the legacy callback signature for surviving Rules / Hooks (Step 5). 5. Cover session behavior - refresh-token rotation plus the nine-point checklist (Step 6). 6. Wire the unit run and the `a0deploy` config-drift diff into CI (Step 8). ## Step 1 - Tenant strate