Quickstart
Create an app, make a delivery key, then let Own Auth Delivery send auth emails for that app.
Create An App
- Sign in to the Own Auth Delivery dashboard.
- Add a standalone app.
- Add the URLs that are allowed to receive auth redirects.
- Create a delivery key for that app.
- Save the raw delivery key in your backend environment.
Configure Own Auth
import { OwnAuthManagedEmailProvider, createOwnAuth } from "own-auth";
export const auth = createOwnAuth({
tokenPepper: process.env.OWN_AUTH_TOKEN_PEPPER,
baseUrl: "https://your-app.com",
emailProvider: new OwnAuthManagedEmailProvider({
deliveryKey: process.env.OWN_AUTH_EMAIL_DELIVERY_KEY
})
});For the managed service, the delivery key is the only delivery-specific value your app needs. Own Auth uses https://api.own-auth.com/v1/email by default. Set a custom endpoint only when you run this delivery service yourself.
Send Email
await auth.requestMagicLink({
email: "user@example.com",
redirectUrl: "/dashboard"
});Own Auth creates the login URL. The managed email provider sends that URL through Own Auth Delivery.