Logotipo de Hor Oidc Sign In

Hor Oidc Sign In

Organización
openreachtech
hor-oidc-sign-in

Sign an actor in through an external OpenID Connect identity provider on a renchan backend: the authorization code flow with PKCE, where state, nonce and the code verifier live, how the ID token is verified, and how the provider's subject links to an actor. Use when adding a 'sign in with' provider. Boundary: tokens, sessions and the refresh cookie follow the cookie authentication convention; a proxy that signs users in before the app, such as IAP, is not this flow.

Descripción general

Editoropenreachtech
Repositoriohora-skills-ort-renchan
Nombre de la habilidadhor-oidc-sign-in
Estrellas
32
Forks
0
Archivos incluidos
4
LicenciaApache-2.0
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Archivos incluidos: 4

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por openreachtech en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Hor Oidc Sign In en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-oidc-sign-in
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/openreachtech/hora-skills-ort-renchan.git /tmp/hora-skills-ort-renchan
mkdir -p .claude/skills
cp -r /tmp/hora-skills-ort-renchan/kit/skills/hor-oidc-sign-in .claude/skills/hor-oidc-sign-in
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Hor Oidc Sign In en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Hor Oidc Sign In automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Hor Oidc Sign In no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

OIDC Sign-in (Backend)

Use this skill when an actor signs in at an external OpenID Connect identity provider (IdP) instead of with a password held by the app. The app is a confidential client: it holds the client secret, starts the flow, receives the authorization code, exchanges it, verifies the ID token, and links the provider's account to one of its own actors.

This skill ends at an actor entity. Opening the session from there is /hor-cookie-authentication, unchanged: SessionClerk.saveSession, the refresh-token cookie, and the access token in the response body. After sign-in, every request still authenticates by the access-token header, renewAccessToken still renews, and signOut still revokes. Nothing in this skill touches those. A proxy that signs the user in before the request reaches the app (IAP) has no code exchange and no session: see /hor-restfulapi-architecture, its behind-iap reference.

Snippets use <Actor> for the role being signed in, as /hor-cookie-authentication does.

The flow

Two public mutations bracket a trip to the IdP. The browser never sees the client secret, the code verifier or the nonce.

frontend            backend                                   identity provider
   | startOidcSignIn     |
   |-------------------->| create state, nonce, code verifier
   |                     | save the authorization row, set the state cookie
   |<--------------------| authorizationUrl
   | navigate ---------------------------------------------->| user signs in
   |<---------------------------------------- redirect to redirect_uri?code&state
   | signInWithOidc      |
   |  { code, state }    | state == cookie == row, row unused and unexpired
   |-------------------->| exchange code + code verifier + client secret ---->|
   |                     |<--------------------------------------- ID token --|
   |                     | verify the ID token, find or link the actor
   |                     | saveSession, refresh cookie, clear the state cookie
   |<--------------------| accessToken

A public mutation pair follows the precedent /hor-graphql-server-engine sets with its public operations. The alternative is a REST GET callback on the backend that answers with a redirect. Choose it only when no frontend page can receive the IdP's redirect. The renderer then answers with a redirect flusher and sets the cookies through the response headers (/hor-restfulapi-architecture), and the rules below hold unchanged.

Rules that keep the flow safe

  • PKCE with S256 on every authorization, even though the app holds a secret. The code_challenge is the SHA-256 digest of the verifier, base64url-encoded without padding. The verifier is 32 random bytes from crypto.randomBytes, base64url-encoded.
  • state ties the callback to the browser that started it. The backend writes it to a short-lived HttpOnly cookie and to the authorization row. signInWithOidc accepts the call only when the state argument, the cookie and a row all agree. Without the cookie, an attacker could hand a victim a callback link that signs the victim in as the attacker.
  • The authorization row is single use and expires in about ten minutes. Spend it with one update guarded on usedAt: null and on expiredAt still ahead, as the refresh-token rotation guards its own, so a replayed or late callback updates nothing. Missing, used and expired rows all raise one error, so the response does not say which.
  • nonce travels inside the ID token. Compare the token's nonce claim to the one stored in the row.
  • Verify the ID token before reading any claim from it (id-token-verification). The code exchange happens over TLS straight from the IdP, but the signature check is still required, because the claims are what the app is about to trust.
  • redirect_uri is a configured value, never taken from the request, and it matches the IdP's registration exactly. The same string goes into the authorization URL and into the token request.
  • Link an actor by (issuer, subject), never by email alone. sub is stable and an email address can change hands. A first sign-in may attach to a pre-registered actor by email only when the token carries email_verified: true, and only once: the identity row it writes is what every later sign-in finds.
  • Keep the IdP's tokens out of storage unless the app calls the IdP's APIs on the actor's behalf. Signing in needs the ID token once, during the callback.
  • The client secret is read through the Share (share.env), like every other env value (environment). Log neither the code, the verifier nor any token.

Core

TopicDescriptionReference
Environment & configThe OIDC_* env vars, the discovery document, the state-cookie constant and the engine's public operationsenvironment
Authorization & identity storageThe two tables and their models: the single-use authorization row and the (issuer, subject) identity linkstorage
ID token verificationOidcIdTokenVerifier: signature by kid, iss, aud, exp, nonce, and why the Share keeps itid-token-verification
ResolversstartOidcSignIn and signInWithOidc, wired to the session clerk and the cookie clerkresolvers

The token-endpoint call and the discovery and key fetches are an external API client (/hor-external-api-client). The IdP stand-in for local runs belongs to /hor-build-e2e-test-environment.

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Son archivos de solo lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA Hor Oidc Sign In?

Sign an actor in through an external OpenID Connect identity provider on a renchan backend: the authorization code flow with PKCE, where state, nonce and the code verifier live, how the ID token is verified, and how the provider's subject links to an actor. Use when adding a 'sign in with' provider. Boundary: tokens, sessions and the refresh cookie follow the cookie authentication convention; a proxy that signs users in before the app, such as IAP, is not this flow.

¿Por qué usar Hor Oidc Sign In en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Hor Oidc Sign In está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Hor Oidc Sign In en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-oidc-sign-in. TypingMind lee el archivo SKILL.md de esa carpeta, empaqueta los archivos de la carpeta e instala el conjunto como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Hor Oidc Sign In?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Hor Oidc Sign In?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Hor Oidc Sign In con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Hor Oidc Sign In?

Sí. openreachtech la ha publicado en GitHub bajo la licencia Apache-2.0. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇