Hor Oidc Sign In logo

Hor Oidc Sign In

Organization
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.

Overview

Publisheropenreachtech
Repositoryhora-skills-ort-renchan
Skill namehor-oidc-sign-in
Stars
32
Forks
0
Bundled files
4
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by openreachtech on GitHub. Read the source before you install it.

Installation

Install the Hor Oidc Sign In AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-oidc-sign-in
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Hor Oidc Sign In in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Hor Oidc Sign In on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Hor Oidc Sign In is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Hor Oidc Sign In AI skill do?

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.

Why use Hor Oidc Sign In on TypingMind?

Because you install it once and use it with any model. Hor Oidc Sign In is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Hor Oidc Sign In in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-oidc-sign-in. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Hor Oidc Sign In?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Hor Oidc Sign In?

As many as you like. As long as a model supports skills, you can use Hor Oidc Sign In with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Hor Oidc Sign In AI skill free?

Yes. It is published on GitHub by openreachtech under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇