webiny-configure-auth0

Configures Auth0 as an external identity provider for Webiny projects.

8.0k|673|Updated Jan 9, 2018
One-click install
npx skills add https://github.com/webiny/webiny-js --skill webiny-configure-auth0
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: webiny-configure-auth0
Source: https://github.com/webiny/webiny-js/tree/main/skills/user-skills/configure-auth0
Command: npx skills add https://github.com/webiny/webiny-js --skill webiny-configure-auth0

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @webiny/auth0.

What problem does it solve?

Webiny projects use Cognito authentication by default, and teams that standardize on Auth0 need a clear path to replace it. This Skill guides the full integration: mapping Auth0 JWT claims to Webiny identities, wiring the React extension component, and setting the required environment variables.

Core Features & Use Cases

  • Identity Mapping: Implements Auth0IdpConfig.Interface to convert Auth0 JWT claims (sub, name, email, roles) into Webiny identity data with roles, teams, and profile fields.
  • Extension Setup: Creates the <Auth0 /> React extension component that injects issuer and client ID environment variables, registers OIDC token verification, and configures the Admin login screen.
  • Custom Claim Verification: Supports verifyTokenClaims to reject tokens missing required custom claims or belonging to unauthorized organizations.
  • Use Case: A team migrating an enterprise Webiny deployment from Cognito to Auth0 SSO creates MyAuth0Config.ts and MyAuth0Extension.tsx, registers them in webiny.config.tsx, sets AUTH0_ISSUER and AUTH0_CLIENT_ID, and deploys.

Quick Start

Ask the AI to configure Auth0 as the identity provider for your Webiny project, replacing the default Cognito authentication.

Frequently Asked Questions about webiny-configure-auth0

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Auth0 authentication in a Webiny project?

Install @webiny/auth0 matching your webiny version, create an Auth0IdpConfig class mapping JWT claims to Webiny identity data, create a React extension rendering the <Auth0 /> component, register it in webiny.config.tsx, set AUTH0_ISSUER and AUTH0_CLIENT_ID, then deploy.

How do I replace Cognito with Auth0 in Webiny?

Replace the <Cognito /> extension with your custom Auth0 extension component in webiny.config.tsx. The <Auth0 /> component from @webiny/auth0 handles OIDC token verification, environment variable injection, and the Admin login screen automatically.

How do I map Auth0 JWT claims to Webiny roles and teams?

Implement the getIdentity method of Auth0IdpConfig.Interface to return an object with id, displayName, roles, teams, and profile fields derived from token claims. Custom claims from Auth0 Actions can be read directly from the JWT payload.

Can I validate custom Auth0 claims before accepting tokens?

Yes, implement the optional verifyTokenClaims method in your Auth0IdpConfig class. Throw an error inside it to reject tokens missing required claims or belonging to unauthorized organizations.

What environment variables does Webiny Auth0 integration require?

Two variables are required: AUTH0_ISSUER (your Auth0 tenant URL) and AUTH0_CLIENT_ID (your Auth0 application client ID). Both are used by the API and Admin app, so both must be redeployed after configuration.