Skip to content
BT. Open to select work
← All case studies07 / 12 · Identity infrastructure

Identity infrastructure

Panastra Auth

One identity layer. A whole family of products.

01 / IdentityOne verified accountEmail and password or Google OAuth enter the same identity boundary.
02 / Trust layerSession + entitlementBetter Auth manages identity while app-scoped subscriptions describe access.
03 / ProductsMany apps, one contractConnected services consume the same session and app-specific plan state.

01 /
One identity across products

As Panastra products multiplied, separate login systems would have multiplied password flows, user records, session bugs, and subscription logic too. I built a shared identity service so a person can have one account while each product retains its own access rules and application data.

02 /
What I built

The TypeScript and Express service uses Better Auth for email and password sign-in, Google OAuth, verification, password recovery, secure cookie sessions, and sign-out. Azure SQL stores identities, accounts, sessions, verification records, roles, and per-product subscriptions. Branded verification and reset emails complete the user-facing flow.

01Authenticate

Better Auth handles credential and social sign-in flows, password hashing, verification, session creation, and CSRF protection.

02Authorize

Protected APIs resolve the server-side session; role checks gate administration instead of trusting a browser-provided identity.

03Entitle

A user can hold a different plan and status for each Panastra app, avoiding a brittle global-plan field.

04Integrate

Browser apps use credentialed requests, while Maya receives a short-lived signed handoff from the verified session.

03 /
The delivery decision

Authentication is a system boundary, not a page. I kept product data outside the identity service and made entitlements explicitly app-scoped. That lets a user remain the same person across the ecosystem while being free in one product, paid in another, and unauthorized for a third. Compatibility endpoints and migration scripts helped evolve the schema without requiring an all-at-once cutover.

The architecture rule

Identity is shared. Product data and product access remain explicit.

04 /
Operating the boundary

The service includes admin-only user, role, ban, and subscription controls; database migrations; redirect allowlists; malformed-request handling; and deployment automation. Because every connected app depends on this boundary, small integration details—cookie scope, callback validation, CORS, verification redirects—matter as much as the sign-in form.

Identity2 sign-in pathsEmail/password and Google OAuth converge on one user.
EntitlementsPer appPlans and statuses remain specific to each product.
ConsumersCross-productOne service contract supports browser and mobile handoffs.

05 /
Evidence & boundaries

The local repository contains the service, public auth screens, admin routes, subscription schema, migration utilities, and integration guidance; the live endpoint is linked below. This is implemented shared infrastructure, not a claim of independent security certification or a particular user scale.

Open service ↗Inspect the repository ↗

Keep exploring

QuizBot

Next case study →Ask about this work ↗