---
title: "Sign-in"
description: "Passwordless sign-in with a magic link or a one-time code."
plan: Pro
docs: https://ui.edbn.me/docs/emails/sign-in
example: magic-link
---

# Sign-in

Passwordless sign-in with a magic link or a one-time code.

## Installation

This is a Pro item. Once per project, create a token at https://ui.edbn.me/dashboard/tokens, put it in `.env.local` as `EDBN_TOKEN`, and add the registry to `components.json`:

```json
{
  "registries": {
    "@edbn": {
      "url": "https://ui.edbn.me/r/{name}.json",
      "headers": { "Authorization": "Bearer ${EDBN_TOKEN}" }
    }
  }
}
```

Then install:

```bash
npx shadcn@4.19.0 add @edbn/email-sign-in
```

## Dependencies
- edbn: email-button, email-code, email-footer, email-layout, email-shared, email-typography

## Render and send

Render it on the server with its typed props, then pass the result to any email provider. [Sending emails](https://ui.edbn.me/docs/emails/emails-sending.md) has Resend, Postmark and SMTP examples and the dark mode options.

```ts send.ts
import SignIn from "@/emails/sign-in";
import { renderEmail } from "@/emails/_shared/render";

// props: the SignInProps type and the samples in examples show every field.
const { subject, html, text } = await renderEmail(SignIn, props);
await resend.emails.send({ from, to, subject, html, text });
```

## Subjects
- Magic link: "Sign in to Kilnwork", previewed as "Your sign-in link works for 15 minutes, once."
- Code: "Your Kilnwork sign-in code", previewed as "Enter the code to sign in. It expires in 10 minutes."

## Usage: Magic link

The example code is part of Pro (https://ui.edbn.me/pricing). With the user's token, the edbn MCP server's `get_example` tool returns it: https://ui.edbn.me/mcp

## Examples
- [Magic link](https://ui.edbn.me/docs/emails/sign-in/magic-link) (Markdown: https://ui.edbn.me/docs/emails/sign-in.md?demo=magic-link)
- [Code](https://ui.edbn.me/docs/emails/sign-in/code) (Markdown: https://ui.edbn.me/docs/emails/sign-in.md?demo=code)

## Files
- emails/sign-in.tsx (148 lines)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
