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.
Better Auth handles credential and social sign-in flows, password hashing, verification, session creation, and CSRF protection.
Protected APIs resolve the server-side session; role checks gate administration instead of trusting a browser-provided identity.
A user can hold a different plan and status for each Panastra app, avoiding a brittle global-plan field.
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 ruleIdentity 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.
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.