본문으로 건너뛰기
Skillpedia
보안8.1k · #12595

webiny-configure-auth0

하는 일

이 스킬은 Webiny 프로젝트의 로그인 공급자로 Auth0를 설정하는 과정을 AI가 안내하도록 합니다. 기본 Cognito 로그인 대신 Auth0를 원하는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓Webiny 프로젝트에 로그인할 때 Cognito 대신 Auth0를 쓰고 싶을 때.
  • ✓Auth0의 JWT 클레임을 Webiny 신원 데이터에 매핑해야 할 때.
  • ✓Auth0 발급자와 클라이언트 ID 환경 변수를 설정해야 하는 경우.

스킬 링크

https://github.com/webiny/webiny-js/blob/next/skills/user-skills/configure-auth0/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/webiny/webiny-js/blob/next/skills/user-skills/configure-auth0/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“우리 Webiny 프로젝트의 Cognito 로그인을 Auth0로 바꾸고, 토큰에서 사용자 이메일을 매핑해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 스킬은 Auth0 패키지 설치, 클레임을 매핑하는 설정 클래스 작성, 설정 파일에 Auth0 확장 컴포넌트 추가를 설명합니다. 배포 전에 발급자와 클라이언트 ID를 환경 변수로 설정합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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:

  1. API Config — A class implementing Auth0IdpConfig.Interface that maps JWT token claims to Webiny's identity structure. Registered via Auth0IdpConfig.createImplementation() (the universal DI pattern).
  2. 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 Auth0IdpFeature API 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

자주 묻는 질문

필요한 환경 변수는 무엇인가요?

발급자 URL과 클라이언트 ID이며, 이름은 AUTH0_ISSUER와 AUTH0_CLIENT_ID입니다.

Auth0가 Cognito를 완전히 대체하나요?

네. 스킬은 Auth0를 기본 Cognito 인증의 대체로 설명합니다.

패키지 버전은 무엇과 맞춰야 하나요?

package.json에 있는 webiny 의존성과 같은 버전이어야 합니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
8.1k
순위
#12595
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬