hardening inner for production: identity, scopes, and audit trails

replaced 100 lines of custom auth with a single identity layer — now serving three AI clients with full audit trails.

package: ai governance layer setup · client: inner — reducibl internal product · industry: consumer AI / emotional wellness · timeline: 1 week

the situation

inner is an emotional memory layer for LLMs — users capture emotionally significant experiences and recall them through semantic search. it was live as a chatgpt app and on iOS, but it had a governance problem: ~100 lines of custom JWT verification code, shared API keys in places they shouldn’t have been, and no audit trail for who accessed what through the AI.

when i exposed inner as an MCP server — allowing claude and other agents to access user memories — the identity gap became critical. the three-party problem (user ↔ LLM ↔ backend) meant that without proper identity binding, any agent could potentially access any user’s emotional data.

what we did

i replaced the entire custom JWT verification layer with gatewaystack’s identity module — one function call instead of ~100 lines of manual JWKS fetching, issuer validation, and scope extraction.

the result

inner went from “working but fragile” to production-hardened in one week. the identity layer now handles authentication uniformly across three client surfaces through a single code path. the custom JWT verification code was eliminated entirely — reducing the auth surface area and removing a class of bugs.

the audit trail answered the question that every AI system eventually faces: “who accessed what data through the AI, and when?” inner can now prove the answer cryptographically.

key decisions


ai governance layer setup — identity, permissions, and audit trails for your AI systems — powered by gatewaystack.


interested in working together? let's talk