Security
Sign in runs on MicroAuth. Your traffic doesn't.
People sign in on pages MicroAuth hosts for you. After that, your apps call your APIs directly and check tokens and keys themselves. MicroAuth never sees your request bodies, headers, query parameters or responses.
Sign in and tokens
- Every app signs people in with the authorization code flow and PKCE. There is no implicit flow and no password grant.
- Redirect URIs must match exactly and use https, except on your own machine. A request with an unknown app or redirect URI shows an error page and never redirects.
- Authorization codes last 60 seconds and work once. If a code is used twice, the refresh token from its first use stops working at once, and its access token runs out on its own.
- Access tokens are short lived and issued for one API or MCP server. A token issued for one server is refused at another, even on the same sign in service.
- Refresh tokens change on every use. If an old one comes back after a short grace period, the whole chain is revoked.
- Each sign in service has its own signing key, encrypted at rest. When you rotate it, the old key stays published only as long as tokens it signed can still be valid.
- The FastAPI SDK keeps sessions in an encrypted, HttpOnly cookie, so browser JavaScript never holds a token.
Apps people connect
- An AI client or other outside app gets nothing until the person approves it on a consent screen that names the app, where it sends them back, and each permission it asks for.
- When an app needs more later, the person approves only the new permissions. People can disconnect an app from their account at any time, and you can block it for everyone.
- When MicroAuth fetches an app's metadata document, it only connects to public addresses over https, follows no redirects and reads at most 5 KB.
Credentials
- Passwords are stored as bcrypt hashes. Nobody at MicroAuth can read them.
- API keys, for your API's customers and for your own users, are shown once and stored as SHA-256 hashes.
- Keys your users create work only at the servers they name, and carry only permissions the person still holds. You can see and revoke them, but you can't create keys for people, so nobody can act as someone else.
- SDK secrets, the client secrets of providers like Google and two step verification secrets are encrypted at rest. Recovery codes are stored as hashes and each one works once.
- Two step verification codes can't be replayed: each code is accepted once.
- Stripe is connected through Stripe Connect. MicroAuth stores your Stripe account ID and never holds your Stripe secret keys.
Sessions and requests
- Session cookies are HTTP only, and secure in production. Each sign in service and each developer portal has its own session, so signing in on one means nothing on another.
- Every request that changes data is checked against the site it came from, which blocks cross site request forgery.
- Sign in, token, consent and verification code endpoints are rate limited per account or app and per network.
- All traffic uses TLS, including sign in pages and developer portals on custom domains.
Isolation
Everyone in the dashboard acts inside a workspace with a role: owner, admin, editor or viewer. Every request is checked against that role. Each service keeps its own users, settings and keys. On a sign in service, codes and refresh tokens only work at the address that issued them. In a developer portal, keys, usage, billing and members belong to one customer account, and each member's role decides what they can see and change.
Billing integrity
- Stripe webhooks are verified against their signature and stored in a durable inbox. Subscriptions and payments are read back from Stripe before they are applied, so events that arrive out of order can't roll anything back.
- Every balance change is a ledger entry with a unique reference, so retried webhooks and repeated API calls never credit or charge twice.
- Usage reports are idempotent, and each request is billed at the price that admitted it, even if you change prices before the report arrives.
- Every night, each customer's balance is checked against the sum of their ledger, and any difference is flagged to us.
Retention
- Processed Stripe webhook events are deleted after 30 days, and events that were never processed after 180 days.
- Usage receipts, kept to ignore duplicate reports, are deleted after about 45 days.
- Hourly usage and the activity log are kept for 400 days. IP addresses in the activity log are removed after 90 days.
- The content of each email is removed from our queue once it is sent. Emails that could not be sent are deleted after 30 days.
- Expired sessions and sign in codes are deleted shortly after they expire, and invitations 30 days after they are accepted or expire.
- Each request for an emailed code is kept for a day, to limit how many codes one address can get. It holds a keyed hash of the address and the kind of code, and the time it was asked for, never the address itself.
- Authorization codes, expired refresh tokens and unfinished external sign ins are cleaned up regularly. Apps that registered themselves are removed after 30 days without use.
- Deleting a user deletes their profile photo and API keys. Revoked or expired keys are deleted after 90 days.
- Portal sign ups that are never approved are deleted after 90 days, and free accounts with no services after 24 months without a sign in, after two email reminders.
- Ledger entries and payment records are kept while the account exists, because they back up billing, disputes and tax records.
- The database is backed up every day. Each backup is checked after it is written, encrypted and kept on the server for 14 days. An off-site copy will follow once that storage is set up.
The privacy policy explains what we collect and how to ask for deletion.
Report a vulnerability
Send security reports to hello@microauth.com with "Security" at the start of the subject. Please don't include working credentials, customer API payloads or unrelated personal data in your first message. We read these reports first and reply as fast as we can.
Read how it works
The docs cover sessions and tokens, how apps people connect get access, and how the API SDK behaves during an outage.