/Platform

Add Sign in with Storytailor

Standard OIDC with PKCE. If you have integrated any social sign-in, you have done this before. The difference is what comes back, and who authorized it.

1. Discovery

Point your OIDC library at the issuer and let it configure itself. Do not hardcode the endpoints.

# Issuer
https://auth.storytailor.com

curl -s https://auth.storytailor.com/.well-known/openid-configuration
Authorizationhttps://auth.storytailor.com/oauth/authorize
Tokenhttps://auth.storytailor.com/oauth/token
FlowAuthorization code with PKCE. No implicit flow, no client secret in a browser.
TokensRS256 id_tokens. Verify against the published JWKS, never skip verification.

2. Scopes. Ask for less

Every scope is shown to a parent in plain language before they approve. A long list is not a stronger integration, it is a lower approval rate, and the purpose-gated ones are reviewed by a human who will ask why.

openidRequired. Identifies the sign-in itself.
stid.basicThe ID name and character avatar. Never a real name or a photo.
stid.age_bandA band, 3-5, 6-8, 9+. Prefer this. It is enough to pitch content correctly.
stid.ageA single age. Purpose-gated: you must say, in words a parent will read, why a band is not enough.
stid.reading_profileReading support and sensory preferences, so your product is accessible from the first screen.
stid.themes:writeWrite back what the child engaged with. Improves their experience everywhere, including outside your product.
stid.story:createCreate a story on their behalf.
parent.basicThe authorizing parent, for account linking. Purpose-gated.

3. Wire it up

Any conformant library works. Two common shapes:

Next.js, Auth.js

providers: [
  {
    id: 'storytailor',
    name: 'Storytailor',
    type: 'oidc',
    issuer: 'https://auth.storytailor.com',
    clientId: process.env.STORYTAILOR_CLIENT_ID,
    clientSecret: process.env.STORYTAILOR_CLIENT_SECRET,
    authorization: { params: { scope: 'openid stid.basic stid.age_band' } },
  },
]

Python, Authlib

oauth.register(
    name="storytailor",
    server_metadata_url="https://auth.storytailor.com/.well-known/openid-configuration",
    client_id=os.environ["STORYTAILOR_CLIENT_ID"],
    client_kwargs={"scope": "openid stid.basic stid.age_band",
                   "code_challenge_method": "S256"},
)

Have your assistant build it

Paste this into Claude Code, Codex, Cursor, or whatever you use. It already carries the issuer, the flow, and the four things agents reliably get wrong when told only “add social login”.

Add "Sign in with Storytailor" to this project using its existing auth setup.

It is standard OIDC. Discover configuration from the issuer. Do not hardcode
endpoints:
  https://auth.storytailor.com/.well-known/openid-configuration

Requirements, all four non-negotiable:
1. Authorization Code flow WITH PKCE (S256). Never the implicit flow. The
   client secret must never reach a browser or a mobile binary.
2. Verify the id_token signature against the published JWKS, and check iss,
   aud and exp. Do not decode without verifying.
3. Request the SMALLEST scope set that makes the feature work. Start with
   "openid stid.basic stid.age_band" and add nothing else without asking me
   first. Every scope is shown to a parent before they approve, and a longer
   list means a lower approval rate. stid.age and parent.basic are
   purpose-gated and reviewed by a human; do not request them speculatively.
4. Handle a revoked grant as an ordinary signed-out state, never an error
   screen. A parent can revoke at any time and a child may be the one looking
   at the screen when they do.

What comes back is deliberately thin: a stable pseudonymous subject, an ID name
the child chose, a character avatar, an age BAND (3-5 / 6-8 / 9+), and reading
preferences if requested. There is no legal name, no birthdate, no photo, no
email for the child, and no location, on any scope. Do not build a profile
screen that has fields for them, and do not add a form asking the child to fill
the gaps.

The child never authenticates. A parent authorizes. Do not add a child password,
a child PIN, or a "child mode" login anywhere in this flow.

Use the reading preferences on the FIRST screen the child sees, not behind a
settings menu. That is the point of receiving them.

What you receive, and what you never will

Read this before you design your profile screen, because the shape is deliberately thin and that is the entire point of the product.

You getA stable pseudonymous subject, an ID name the child chose, a character as their avatar, an age band, and reading preferences if you asked for them.
You never getA legal name, a birthdate, a photograph, an email address for the child, or a location. Not on any scope, not on any tier, not on request.
Who authorizedA parent. The child never authenticates. There is no child password anywhere in this flow, which is what keeps you out of holding children’s credentials.
RevocationA parent can revoke at any time from their Storytailor settings. Handle a revoked grant as an ordinary signed-out state, never as an error the child sees.

4. Go live

Every client starts pending. You can build and test the whole flow in that state; activation is the launch gate and needs your exact redirect URIs, your own privacy and terms URLs, and a parent-readable reason for each purpose-gated scope.

Free, always. We will never take a commission on a parental consent.

Add Sign in with Storytailor · Storytailor Platform