Logo van Hor Cookie Authentication

Hor Cookie Authentication

Organisatie
openreachtech
hor-cookie-authentication

Password sign-in with cookie-based sessions for a renchan backend, per actor: the credential and token models (password hash, access + rotating refresh tokens with reuse detection), the refresh-token HttpOnly cookie, the signIn / signUp / signOut / renewAccessToken resolvers, and the engine's public-operation policy. Use when adding password auth to an actor/role. Boundary: external identity provider sign-in and other credential routes have their own conventions.

Overzicht

Uitgeveropenreachtech
Repositoryhora-skills-ort-renchan
Skillnaamhor-cookie-authentication
Sterren
32
Forks
0
Meegeleverde bestanden
9
LicentieApache-2.0
Links
  • Instructies in Markdown

    Een SKILL.md-bestand dat het model laadt wanneer nodig, zodat het alleen tokens kost als een verzoek er daadwerkelijk bij past.

  • Werkt met elk LLM

    AI-skills zijn gewone Markdown, geen aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • 9 meegeleverde bestanden

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. Bestanden zijn alleen-lezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door openreachtech op GitHub. Lees de broninhoud voordat je de skill installeert.

Installatie

Installeer de AI-skill Hor Cookie Authentication in TypingMind om deze met elke LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map — het leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-cookie-authentication
  4. Schakel de skill in elke chat in waarin je deze beschikbaar wilt hebben.
Plug-ins → Skills → Nieuwe skill → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

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-cookie-authentication .claude/skills/hor-cookie-authentication
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Hor Cookie Authentication in een willekeurige chat in TypingMind in en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek erbij past, laadt het model zelf de volledige instructies — je hoeft de skill nooit handmatig aan te roepen en deze kost pas tokens wanneer je de skill daadwerkelijk gebruikt.

Het model laadt Hor Cookie Authentication automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Hor Cookie Authentication niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Cookie Authentication (Backend)

Use this skill when adding password sign-in with cookie-based sessions to a renchan backend: storing an actor's credential and tokens, the sign-in / sign-out / renew operations, the refresh-token cookie, and deciding which operations are public.

An authenticated actor (a role such as user, customer, admin, or tenant) keeps its password as a hash and authenticates with two tokens: a short-lived access token the client sends as a header, and a long-lived refresh token kept in the DB and handed to the browser as an HttpOnly cookie. signIn issues both; renewAccessToken reads the cookie, rotates the refresh token (detecting reuse of a retired one), and returns a fresh access token; signOut revokes the series and clears the cookie. Only renewAccessToken and signOut authenticate by the cookie — every other operation authenticates by the access-token header.

This skill covers the password route only. An actor who signs in at an external OpenID Connect provider follows /hor-oidc-sign-in, which ends where this skill's session begins and reuses it unchanged. A request that carries its credential in a cookie, a Bearer header, an IAP JWT or an HMAC signature instead of x-renchan-access-token, and an application behind IAP that has no sign-in of its own, are in /hor-restfulapi-architecture.

You build this per actor, on top of the boilerplate's base classes — it is not shipped in the boilerplate; each app builds it for the actors its spec declares. Design the actor entity and its profile first with [[hor-database-design]] / [[hor-sequelize-model]]; this skill adds the credential, tokens, operations, and cookie to it. It says what the auth cluster contains and how the pieces fit — writing each piece follows its own convention ([[hor-sequelize-model]], [[hor-sequelize-seeder]], [[hor-mutation-resolver]], [[hor-type-interface]]), and the engine is [[hor-graphql-server-engine]].

This replaces the older access-token-only flow. In the old flow the access token was the durable credential — stored on the client and sent on every request, with no refresh cookie. Here the access token is short-lived and held only in memory on the client; durability comes from the refresh cookie. Do not mix the two: when this skill applies, there is no long-lived access token. The frontend half is [[hof-cookie-authentication]].

Snippets throughout use <Actor> for the role being authenticated — substitute your own (Member, Operator, Account, …). Not every app has a "customer"; the reference implementation these snippets are drawn from happens to use Customer and Admin.

Core

TopicDescriptionReference
Environment & configStep-by-step setup: the cookie dependency, the AUTH_* env vars + facade, the per-actor cookie-name constant, and the engine's refresh-token cookie configenvironment
Token & credential modelsPer actor: the password-hash model and the access / refresh token models, with sessionKey rotation columns and the backup mixintoken-models
MigrationsThe create-table migrations for the credential and token tablesmigrations
Session clerkSessionClerk — the injected orchestrator over the token tables (saveSession / rotateSession / revokeSession / findRefreshToken), returning throwable-save result objectssession-clerk
Refresh-token cookieThe HttpOnly cookie clerk and reading / setting the cookie in the GraphQL contextcookie-context
Auth resolverssignIn / signUp / signOut / renewAccessToken — token issue, rotation, and reuse detectionresolvers
Auth-filter policyschemasToSkipFiltering + generateFilterHandler — which operations are public (cookie) vs header-guardedauth-filter
Error codesThe Unauthenticated and RefreshTokenReused codes and where they are thrownerror-codes
Dev-login seederA development seeder so npm run dev can sign in against real datadev-login-seeder

Meegeleverde bestanden

Het model leest deze bestanden wanneer nodig terwijl de skill geladen is. Ze worden beschikbaar gesteld als leesbare bestanden en worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Hor Cookie Authentication?

Password sign-in with cookie-based sessions for a renchan backend, per actor: the credential and token models (password hash, access + rotating refresh tokens with reuse detection), the refresh-token HttpOnly cookie, the signIn / signUp / signOut / renewAccessToken resolvers, and the engine's public-operation policy. Use when adding password auth to an actor/role. Boundary: external identity provider sign-in and other credential routes have their own conventions.

Waarom Hor Cookie Authentication gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Hor Cookie Authentication bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model, en je kunt midden in een chat van model wisselen zonder dat de skill niet meer werkt. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Hor Cookie Authentication in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-cookie-authentication. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Hor Cookie Authentication gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Hor Cookie Authentication gebruiken?

Zoveel als je wilt. Zolang een model skills ondersteunt, kun je Hor Cookie Authentication ermee gebruiken: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama en meer. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Hor Cookie Authentication gratis?

Ja. Deze skill is door openreachtech op GitHub gepubliceerd onder de licentie Apache-2.0. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. Deze volgt het open Agent Skills-formaat: een bestand met de naam SKILL.md met een naam en beschrijving, plus eventuele scripts, sjablonen of referentiebestanden die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇