webiny-configure-auth0
Qué hace
Esta habilidad guía a tu IA en la configuración de Auth0 como proveedor de inicio de sesión de un proyecto Webiny. Es para desarrolladores que quieren Auth0 en lugar del inicio de sesión de Cognito por defecto.
Cuándo usarla
- ✓Cuando quieres que Auth0 sustituya a Cognito para iniciar sesión en un proyecto Webiny.
- ✓Cuando las claims del JWT de Auth0 deben asignarse a los datos de identidad de Webiny.
- ✓Cuando necesitas configurar las variables de entorno del emisor y del ID de cliente de Auth0.
Link de la skill
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/configure-auth0/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Sustituye el inicio de sesión de Cognito de nuestro proyecto Webiny por Auth0 y asigna el correo del usuario desde el token.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La habilidad explica cómo instalar el paquete de Auth0, escribir una clase de configuración que asigne las claims y añadir un componente de extensión de Auth0 en el archivo de configuración. El emisor y el ID de cliente se establecen como variables de entorno antes de desplegar.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Configure Auth0 Authentication
TL;DR
Webiny supports Auth0 as an external identity provider (IDP) to replace the default Cognito authentication. First, install the @webiny/auth0 package (using the same version as the webiny dependency in package.json). Then create two files: an API config class that maps Auth0 JWT claims to Webiny identity data (Auth0IdpConfig), and a React extension component (<Auth0 />) that wires issuer URL, client ID, and the API config path. Register the extension in webiny.config.tsx, set two environment variables (AUTH0_ISSUER, AUTH0_CLIENT_ID), and deploy.
Pattern / Core Concept
Auth0 integration has two parts:
- API Config — A class implementing
Auth0IdpConfig.Interfacethat maps JWT token claims to Webiny's identity structure. Registered viaAuth0IdpConfig.createImplementation()(the universal DI pattern). - Extension Component — A React component that renders
<Auth0 />from@webiny/auth0, passing the issuer URL, client ID, and path to the API config file. The<Auth0 />component handles environment variable injection, API extension registration, and Admin login screen setup automatically.
How <Auth0 /> Works Internally
The <Auth0 /> component (from @webiny/auth0) is a defineExtension that:
- Sets Lambda env vars:
AUTH0_ISSUER,AUTH0_CLIENT_ID - Sets Admin app env vars:
REACT_APP_IDP_TYPE=auth0,REACT_APP_AUTH0_ISSUER,REACT_APP_AUTH0_CLIENT_ID - Registers the internal
Auth0IdpFeatureAPI extension (OIDC token verification) - Registers your custom API config extension (identity mapping)
- Registers the Admin Auth0 login screen extension
Reference Tables
Auth0IdpConfig.Interface
| Method | Signature | Required | Description |
|---|---|---|---|
getIdentity |
(token: JwtPayload) => Auth0Identity | Promise<Auth0Identity> |
Yes | Maps JWT claims to Webiny identity data |
verifyTokenClaims |
(token: JwtPayload) => void | Promise<void> |
No | Custom claim verification (throw to reject the token) |
Auth0Identity (Return Type of getIdentity)
| Field | Type | Description |
|---|---|---|
id |
string |
Unique user ID (typically token["sub"]) |
displayName |
string |
User's display name |
roles |
string[] |
Webiny security roles to assign |
teams |
string[] |
Webiny teams (optional, filter out falsy values) |
profile |
{ firstName, lastName, email } |
User profile fields |
context |
object |
Runtime data (not stored in DB) |
<Auth0 /> Component Props
| Prop | Type | Description |
|---|---|---|
issuer |
string |
Auth0 issuer URL (e.g., https://your-tenant.auth0.com) |
clientId |
string |
Auth0 application client ID |
apiConfig |
string |
Absolute path to the API config file |
Environment Variables
| Variable | Used By | Description |
|---|---|---|
AUTH0_ISSUER |
API + Admin | Auth0 issuer URL |
AUTH0_CLIENT_ID |
API + Admin | Auth0 application client ID |
Full Examples
Example 1: Basic Auth0 Configuration
Step 0: Install the @webiny/auth0 dependency
@webiny/auth0 is an optional dependency. Add it to package.json using the same version as the webiny dependency, then install:
# Check the webiny version in package.json, then add @webiny/auth0 with the same version
# For example, if "webiny": "^0.0.0-unstable.xxx":
yarn add @webiny/auth0@^0.0.0-unstable.xxx
Important: After adding the dependency, tell the user to r
Preguntas frecuentes
¿Qué variables de entorno hacen falta?
La URL del emisor y el ID de cliente, llamados AUTH0_ISSUER y AUTH0_CLIENT_ID.
¿Auth0 sustituye por completo a Cognito?
Sí. La habilidad describe Auth0 como sustituto de la autenticación de Cognito por defecto.
¿A qué versión debe coincidir el paquete?
A la misma versión que la dependencia de webiny en package.json.
Detalles
Descripción original del autor
Configuring Auth0 as an identity provider (IDP) for Webiny projects. Use this skill when the developer asks about Auth0 authentication, Auth0 SSO, replacing Cognito with Auth0, setting up external identity providers, configuring OIDC authentication, mapping JWT claims to Webiny identities, or customizing the Auth0 login flow. Also relevant when asking about AUTH0_ISSUER, AUTH0_CLIENT_ID environment variables, Auth0IdpConfig, or the MyAuth0Extension pattern.
repo: webiny/webiny-js
Popularidad
- Estrellas en GitHub
- 8,1 mil
- Posición en el ranking
- #12595
- Licencia
- —
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
prd-to-plan
8,1 milAyuda a tu agente a convertir un documento de requisitos de producto en un plan por fases de pequeñas porciones de extremo a extremo, guardado como archivo Markdown.
webiny-admin-architect
8,1 milEnseña a tu agente a crear pantallas de administración para la plataforma Webiny, usando sus capas de lógica de negocio y el patrón presentador.
webiny-admin-permissions
8,1 milEnseña a tu agente a añadir controles de permisos a las pantallas de administración de Webiny, con formularios de permisos autogenerados y comprobaciones de mostrar u ocultar.
webiny-form-model
8,1 milEnseña a tu agente a construir formularios en Webiny con un constructor de campos declarativo, distribuciones, validación y reglas condicionales.
Skills parecidas
reverse-engineer-anything
422 milAyuda a tu agente a revisar apps y paquetes ya publicados para explicar sus funciones, comparar versiones o guiar una reconstrucción, usando la herramienta REA.
1password
394 milAyuda a tu agente a instalar la CLI de 1Password, iniciar sesión y leer o inyectar secretos sin imprimir sus valores en el chat.
healthcheck
394 milAyuda a tu agente a auditar el ordenador o servidor que ejecuta OpenClaw en busca de riesgos de seguridad, como SSH, cortafuegos, actualizaciones y copias de seguridad, y después sugerir arreglos seguros.