> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Magic link & OTP

Send and verify passwordless login codes
<div class="sdk-client-page">

Use the `passwordless` client to send and verify email magic links or one-time codes for sign-in.

Call send, then verify with the code or link token from the user's email to complete login.

### sendPasswordlessEmail
<div class="sdk-method-section">

      Send a passwordless authentication email

        The email address to send the passwordless link to

        Optional fields: `template`, `state`, `magiclinkAuthUri`, `expiresIn`, `templateVariables`.

        Send passwordless.

```typescript
// template: template
// state: Opaque state string
// magiclinkAuthUri: magiclink auth uri
// expiresIn: expires in
// templateVariables: template variables
const response = await scalekit.passwordless.sendPasswordlessEmail(
  'user@example.com',
  {
    template: 'SIGNIN',
    state: 'random-state',
    expiresIn: 3600
  }
);

console.log('Auth Request ID:', response.authRequestId);
```

</div>

### verifyPasswordlessEmail
<div class="sdk-method-section">

      Verify a passwordless authentication code or link token

        code, linkToken.

        Optional. Optional auth request ID from the send response

        Verified claims.

```typescript
// code: Authorization code
// linkToken: link token
const response = await scalekit.passwordless.verifyPasswordlessEmail(
  { code: '123456' },
  'auth_request_id'
);

console.log('Email:', response.email);
```

</div>

### resendPasswordlessEmail
<div class="sdk-method-section">

      Resend a passwordless authentication email

        The auth request ID from the original send response

        Send passwordless.

```typescript
const response = await scalekit.passwordless.resendPasswordlessEmail('auth_request_id');
```

</div>

</div>


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
