Security & Trust

Security is our foundation

EmbedAuth is built for developers who care about the security of their users. Here's how we protect your data at every layer.

Security architecture

Defense in depth across every layer of the stack.

Encryption & Hashing

EmbedAuth is served over HTTPS with HSTS. Passwords are hashed with bcrypt at cost 12, and client secrets, refresh tokens, magic links and one-time codes are stored only as hashes. Secrets the service has to read back — JWT signing keys, webhook signing secrets and reCAPTCHA keys — are encrypted with AES-256-GCM.

Rate Limiting & Brute-Force Protection

Sign-in, sign-up and account-recovery endpoints are rate-limited per IP address, and endpoints that send email are also limited per email address. Ten wrong passwords in a row lock an account for five minutes. Successful and failed sign-ins are recorded as auth events.

RS256-Signed JWT Tokens

EmbedAuth issues short-lived JWTs signed with RSA private keys (RS256). The corresponding public keys are exposed via the JWKS endpoint for server-side verification — no shared secrets, no symmetric keys.

Audit Logging

Dashboard sign-ins and changes to apps, themes and team membership are written to an organization audit log with who did it and when. End-user sign-ups and sign-ins are recorded separately as auth events with IP address and user agent.

Origin & Domain Validation

Each app has a list of allowed domains. The widget posts tokens only to a page on one of them, using that page's exact origin as the message target, so a site that copies your embed code receives nothing. Redirects after sign-in are limited to the same list.

Tenant Isolation

Every query is scoped to the organization and app it belongs to, and dashboard permissions are checked on the server for each request. End users of one app are never visible from another. Database credentials stay in the server environment.

Session Revocation

Refresh tokens are single-use, and presenting a spent one revokes every token from the same sign-in. Each active session is listed in the dashboard with its user, IP address, browser and expiry, and any one of them can be revoked there.

Content Security Policy

The widget is served with a Content-Security-Policy that allows only its own script and Google reCAPTCHA. Every other EmbedAuth page refuses to be framed by other sites. We recommend setting `frame-src` in your own CSP to scope iframe embeds to EmbedAuth's hosts only.

Security practices

A checklist of the security controls enforced across all EmbedAuth deployments.

Passwords hashed with bcrypt (cost 12)
JWTs signed with RS256 — no shared secrets
One-hour access tokens with single-use refresh tokens
HTTPS everywhere, with HSTS
HttpOnly, SameSite=Lax dashboard session cookies
Parameterized queries — no raw SQL concatenation
npm dependency audit before every deploy
Role-based permissions for dashboard team members
Secrets managed via environment variables — never hardcoded
Pages other than the widget refuse to be framed

Recommended CSP configuration

Set this header on pages that embed the EmbedAuth iframe to restrict framing to your EmbedAuth origin only.

# HTTP response header
Content-Security-Policy: frame-src https://embedauth.com https://cdn.embedauth.com;

# Or as a <meta> tag
<meta http-equiv="Content-Security-Policy"
  content="frame-src https://embedauth.com https://cdn.embedauth.com;">

Both hosts are required: the iframe URL points at embedauth.com, which redirects to the static CDN at cdn.embedauth.com. CSP enforces frame-src on every hop of the redirect chain. Self-hosters should substitute their own auth and CDN hostnames.

Responsible Disclosure

We take security vulnerabilities seriously. If you discover a potential security issue, please disclose it responsibly by emailing [email protected]. Include a description of the vulnerability, steps to reproduce, and your contact details.

  • We will acknowledge receipt within 48 hours
  • We target a fix or mitigation within 14 days for critical issues
  • We will credit researchers in our release notes (optional)
  • Please do not publicly disclose until a fix is shipped

Ship auth you can trust

Start for free. Upgrade when you need more scale.