Skip to contentSkip to navigation

Send authentication emails

Send magic links, email verification, password resets, and organisation invitations through Cloud.

Send authentication email

When cloud() is configured, Own Auth sends magic links, verification emails, password resets, and organisation invites through the app's Cloud API key. No separate email provider is required.

auth.ts
import { createOwnAuth } from "own-auth";
import { cloud } from "own-auth/cloud";

export const auth = createOwnAuth({
  tokenPepper: process.env.OWN_AUTH_TOKEN_PEPPER,
  plugins: [cloud({ key: process.env.OWN_AUTH_CLOUD_KEY! })]
});

Safety and limits

Cloud accepts only authentication email types. It validates recipients, configured URL destinations, idempotency keys, app quotas, and recipient limits. Tokens, URLs, message bodies, provider diagnostics, and raw keys never enter telemetry or delivery logs.

Use your own provider

An explicit emailProvider takes precedence over Cloud delivery. Cloud remains connected for dashboard, analytics, audit, and security features while the application sends its own email.