Pular para o conteúdo
Skillpedia
Segurança8,1 mil · #12597

webiny-configure-okta

O que ela faz

Esta skill orienta sua IA na configuração do Okta como provedor de login de um projeto Webiny. É para desenvolvedores cuja empresa usa o Okta para login único.

Quando usar

  • ✓Quando você quer que o Okta substitua o Cognito para entrar em um projeto Webiny.
  • ✓Quando as claims dos tokens do Okta precisam ser mapeadas para dados de identidade do Webiny.
  • ✓Quando você precisa definir as variáveis de ambiente do emissor e do client ID do Okta.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/webiny/webiny-js/blob/next/skills/user-skills/configure-okta/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Troque nosso projeto Webiny para o login Okta e mapeie a claim de e-mail dos tokens do Okta.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

A skill explica como instalar o pacote do Okta, escrever uma classe de configuração que mapeia as claims do token e adicionar um componente de extensão do Okta no arquivo de configuração. O emissor e o client ID são definidos como variáveis de ambiente antes do deploy.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do GitHub.

Configure Okta Authentication

TL;DR

Webiny supports Okta as an external identity provider (IDP) to replace the default Cognito authentication. First, install the @webiny/okta package (using the same version as the webiny dependency in package.json). Then create two files: an API config class that maps Okta JWT claims to Webiny identity data (OktaIdpConfig), and a React extension component (<Okta />) that wires issuer URL, client ID, and the API config path. Register the extension in webiny.config.tsx, set two environment variables (OKTA_ISSUER, OKTA_CLIENT_ID), and deploy.

Pattern / Core Concept

Okta integration has two parts:

  1. API Config — A class implementing OktaIdpConfig.Interface that maps JWT token claims to Webiny's identity structure. Registered via OktaIdpConfig.createImplementation() (the universal DI pattern).
  2. Extension Component — A React component that renders <Okta /> from @webiny/okta, passing the issuer URL, client ID, and path to the API config file. The <Okta /> component handles environment variable injection, API extension registration, and Admin login screen setup automatically.

How <Okta /> Works Internally

The <Okta /> component (from @webiny/okta) is a defineExtension that:

  • Sets Lambda env vars: OKTA_ISSUER, OKTA_CLIENT_ID
  • Sets Admin app env vars: REACT_APP_IDP_TYPE=okta, REACT_APP_OKTA_ISSUER, REACT_APP_OKTA_CLIENT_ID
  • Registers the internal OktaIdpFeature API extension (OIDC token verification)
  • Registers your custom API config extension (identity mapping)
  • Registers the Admin Okta login screen extension

Reference Tables

OktaIdpConfig.Interface

Method Signature Required Description
getIdentity (token: JwtPayload) => OktaIdentity | Promise<OktaIdentity> Yes Maps JWT claims to Webiny identity data
verifyTokenClaims (token: JwtPayload) => void | Promise<void> No Custom claim verification (throw to reject the token)

OktaIdentity (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)

<Okta /> Component Props

Prop Type Description
issuer string Okta issuer URL (e.g., https://dev-xxx.okta.com)
clientId string Okta application client ID
apiConfig string Absolute path to the API config file

Environment Variables

Variable Used By Description
OKTA_ISSUER API + Admin Okta issuer URL
OKTA_CLIENT_ID API + Admin Okta application client ID

Full Examples

Example 1: Basic Okta Configuration

Step 0: Install the @webiny/okta dependency

@webiny/okta 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/okta with the same version
# For example, if "webiny": "^0.0.0-unstable.xxx":
yarn add @webiny/okta@^0.0.0-unstable.xxx

Important: After adding the dependency, tell the user to run yarn to install it. Do NOT run yarn automatically — let the user do it.

Perguntas frequentes

Quais variáveis de ambiente são usadas?

OKTA_ISSUER e OKTA_CLIENT_ID.

O Okta substitui o Cognito?

Sim. A skill descreve o Okta como substituto da autenticação padrão do Cognito.

O fluxo de login pode ser personalizado?

Sim. A skill menciona a personalização do fluxo de login do Okta.

Detalhes

Descrição original do autor

Configuring Okta as an identity provider (IDP) for Webiny projects. Use this skill when the developer asks about Okta authentication, Okta SSO, replacing Cognito with Okta, setting up external identity providers, configuring OIDC authentication, mapping JWT claims to Webiny identities, or customizing the Okta login flow. Also relevant when asking about OKTA_ISSUER, OKTA_CLIENT_ID environment variables, OktaIdpConfig, or the MyOktaExtension pattern.

repo: webiny/webiny-js

Popularidade

Estrelas no GitHub
8,1 mil
Posição no ranking
#12597
Licença
—
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas