Oauth data simulation
Skill kjuhwa/skills-hub/skills/workflow/oauth-data-simulation
Generating realistic OAuth tokens, flow states, and scope sets for client-side simulators without a real auth serverFrom its SKILL.md
npx -y skills add kjuhwa/skills-hub --skill oauth-data-simulationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.0 KB, 400 tokens by cl100k_base, as published. Nobody here has run it
oauth-data-simulation
Client-side OAuth simulators need deterministic-but-realistic fixture data: generate JWTs in-browser using a well-known symmetric secret ("demo-secret-do-not-use-in-prod") or an ephemeral Web Crypto–generated keypair so signatures actually verify. Populate claims with plausible values — iss: "https://auth.example.com", aud: "api://default", sub: "user_" + nanoid(8), iat: now, exp: now + 3600, plus domain-appropriate custom claims (scope, roles, tenant_id). Include a gallery of pre-seeded anomalous tokens: expired, not-yet-valid (nbf in future), wrong-audience, algorithm-confusion (alg: none), tampered-payload-valid-signature — these are the scenarios users most want to inspect.
For flow simulation, model each OAuth grant type as a state machine with explicit transitions and wire-level artifacts at each edge: /authorize request params, consent screen, redirect with code, /token POST body, token response JSON. Store the full transcript as an array of {step, timestamp, direction: 'client→as' | 'as→client', payload} entries so users can scrub through the exchange. For PKCE, generate code_verifier (43–128 char URL-safe random) and derive code_challenge via SHA-256 + base64url on the fly — don't hardcode, because users will want to change the verifier and see the challenge update.
Scope simulation should ship a realistic scope catalog (OIDC standards: openid profile email address phone offline_access plus resource-specific: read:X write:X admin:X delete:X) and a resource catalog mapping endpoints to required scopes. Then simulate consent: user-granted subset → token scope claim → API call authorization decision. Randomize partial grants to teach users that requested ≠ granted.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.