# Implement flow

Part of **Clerk**. Route queries via `POST https://www.company-skill.com/api/route`.

## What You Want to Do

You want to implement a non-default authentication experience in your application—such as email link verification, Google One Tap, user impersonation, or a waitlist-based sign-up—using Clerk’s tools. This may involve custom logic, UI, or configuration beyond standard username/password login.

**Typical User Questions**:
- How to implement email link authentication with Clerk?
- How to implement Google One Tap authentication with Clerk?
- How to build custom sign-in/sign-up pages?
- How to handle user impersonation in Clerk?

## Decision Tree

Pick the best path for your situation:

- **If** you need to implement programmatic logic like `user impersonation`, `email link verification`, or integrate `bot protection`/`client trust` checks → Use **Use authentication APIs and hooks** (go to *clerk/clerk-authentication*)
- **If** you’re setting up standard providers (Google, GitHub, etc.) using `Client ID` and `Client Secret` via the `Provider dropdown` in `Dashboard > Authentication` → Use **Configure flows via dashboard and guides** (go to *clerk/clerk-authentication*)
- **If** your flow involves `Waitlists`, `Profile Settings`, or `Customize Navigation` using components like `OrganizationProfile.Page` or `OrganizationProfile.Link` → Use **Build UI-driven custom flows** (go to *clerk/clerk-user_mgmt*)
- **Otherwise (default)** → Start with **Configure flows via dashboard and guides** if you only need standard sign-in methods; otherwise, use **Use authentication APIs and hooks** for maximum flexibility.

## Path Comparison

| Path | Best For | Complexity | Code Required | Automation | Key Fact | Detail Skill |
|------|----------|------------|---------------|------------|----------|-------------|
| Use authentication APIs and hooks | Building fully programmatic flows with maximum control over logic and state. | high | Yes | Yes | Requires Clerk SDK v6+ and supports frameworks like Next.js, React, Vue, Expo, Express | `clerk/api/clerk-authentication` |
| Configure flows via dashboard and guides | Setting up common flows like email links or social login with minimal coding. | low | No | No | Uses `Dashboard > Authentication` > `Social Connections` with `Client ID`/`Client Secret` | `clerk/guide/clerk-authentication` |
| Build UI-driven custom flows | Creating user-facing flows like waitlists or impersonation with prebuilt UI guidance. | medium | Yes | No | Waitlists are free for up to 10,000 entries/month; uses `Dashboard > Users` and `Dashboard > Organizations` | `clerk/guide/clerk-user_mgmt` |

## Path Details

### Path 1: Use authentication APIs and hooks

**Best For**: Building fully programmatic flows with maximum control over logic and state.

**Brief Description**: This approach uses the **Clerk SDK** with hooks like **`useSignIn`** and **`useSignUp`** to build a **custom sign-in flow** from scratch. It supports advanced features such as **email link verification**, **user impersonation**, **client trust** validation, and **bot protection**—all implemented programmatically in your frontend or backend code.

**Key technical facts**:
- Runtimes: Next.js, React, Vue, Astro, Nuxt, Expo, Chrome Extension, Express

**When to Use**:
- Need full control over authentication logic and state transitions
- Building complex flows like user impersonation or email link handling
- Integrating with frameworks like Next.js App Router or Chrome Extensions requiring custom routing

**When NOT to Use**:
- User wants to configure common flows like social login without writing code
- Team lacks frontend development resources for building custom UIs
- Prefer dashboard-based configuration over programmatic implementation

**Known Limitations**:
- Requires coding knowledge to implement flows programmatically
- Certain features like client trust verification require specific dashboard settings to be enabled beforehand (e.g., Client Trust, Email/phone verification)
- Does not provide a no-code UI builder — all UI must be implemented manually

### Path 2: Configure flows via dashboard and guides

**Best For**: Setting up common flows like email links or social login with minimal coding.

**Brief Description**: Use **`Dashboard > Authentication`** to configure standard methods under **`User & authentication`** > **`Sign-in methods`**. Add providers via **`Social Connections`** by selecting from the **`Provider dropdown`**, entering your **`Client ID`** and **`Client Secret`**, and clicking **`Enable this connection`**. This leverages Clerk’s **prebuilt components** and requires no custom logic.

**Key technical facts**:
- Prerequisites: Clerk account, app created, Clerk SDK installed (even though no code is written)

**When to Use**:
- Setting up standard social login providers like Google or GitHub quickly
- Configuring basic email/password authentication without coding
- Enabling Atlassian or other supported OAuth connections via dashboard forms

**When NOT to Use**:
- Need to implement non-standard flows like waitlists or user impersonation
- Require fine-grained control over authentication steps or UI behavior
- Building programmatic integrations that require API-level access

**Known Limitations**:
- Limited to prebuilt authentication methods supported by Clerk (e.g., cannot implement custom OAuth providers not listed)
- Cannot customize authentication logic beyond what the dashboard exposes
- Requires SDK installation even for minimal setup, despite no-code claims

### Path 3: Build UI-driven custom flows

**Best For**: Creating user-facing flows like waitlists or impersonation with prebuilt UI guidance.

**Brief Description**: Use **`Dashboard > Users`** for **`Profile Settings`** and **`Dashboard > Organizations`** for **`Profile Customization`**. Create a **`Waitlists`** entry via **`Create Waitlist`**, and extend UIs using components like **`OrganizationProfile.Page`** and **`OrganizationProfile.Link`** to **`Customize Navigation`**. This blends dashboard configuration with light code integration.

**Key technical facts**:
- Billing: Free for up to 10,000 waitlist entries per month; additional entries billed at $0.001 per entry
- Runtimes: Next.js, React, Expo, TanStack React, Start React Router, Astro, Chrome Extension, Nuxt, Vue

**When to Use**:
- Implementing waitlists for user sign-ups with framework-specific SDK guidance
- Adding custom navigation items to user or organization profiles via dashboard + code
- Managing organization roles and access control through UI-driven workflows

**When NOT to Use**:
- Need fully programmatic authentication flow control without UI dependencies
- Building flows that don't involve user/organization management (e.g., pure sign-in logic)
- Require bulk user operations that aren't supported in the dashboard

**Known Limitations**:
- Waitlist feature limited to 10,000 free entries per month
- Profile customization requires specific frontend framework support (e.g., Vue.js for organization profiles)
- Bulk user operations like deletion not supported via dashboard — requires contacting support

## FAQ

Q: Which path should I start with?
A: If you only need Google, GitHub, or email/password login, start with **Configure flows via dashboard and guides**. If you need email link magic links, user impersonation, or custom logic, start with **Use authentication APIs and hooks**.

Q: What if I need **user impersonation** but chose **Configure flows via dashboard and guides**?
A: You’ll hit a hard limitation—impersonation isn’t available in the dashboard and requires programmatic use of the Clerk SDK with `handleUserImpersonation`.

Q: What if I try to build a **waitlist** using only the **authentication dashboard**?
A: You won’t find waitlist controls in `Dashboard > Authentication`; waitlists are managed under `Dashboard > Apps > [Your App] > Waitlists` and require the **Build UI-driven custom flows** path.

Q: Can I use **email link verification** without writing code?
A: Partially—you can enable email links in `Dashboard > Authentication` > `Sign-in methods`, but handling the redirect and verification logic still requires the **Clerk SDK** and `handleEmailLinkFlow` in code.

Q: What happens if I need **bot protection** but avoid the API path?
A: Bot protection (via `addBotProtectionToSignUpFlow`) is only available through SDK hooks—you cannot enable it via dashboard alone.

Q: Do I still need the **Clerk SDK** if I use the dashboard-only approach?
A: Yes—all paths require the Clerk SDK installed in your project, even if you write no authentication code.

Q: Can I combine paths?
A: Yes—for example, configure Google login via dashboard, then use `useSignIn` to customize the post-login redirect. But core flow logic must align with one primary path.

## Related queries

implement custom auth flow, custom authentication flow, build custom sign-in, create custom login, email link auth, Google One Tap auth, user impersonation Clerk, waitlist signup Clerk, how to do email link login, how to add social login, configure OAuth Clerk, set up custom sign-up, implement bot p

---
Part of [Clerk](https://www.company-skill.com/p/clerk.md) · https://www.company-skill.com/llms.txt
