> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deck.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication Overview

> Connect your users to external sources.

## Building an authentication flow

Deck provides three ways to authenticate your users to their data sources.

<CardGroup cols={3}>
  <Card title="Auth SDK" icon="bolt" href="/guides/authentication/deck-auth">
    A drop-in UI component provided by Deck. Get started quickly while simplifying auth handling and MFA flows.
  </Card>

  <Card title="Custom UI" icon="terminal" href="/guides/authentication/custom">
    Build a custom auth flow using the Deck API. Take complete control of your experience.
  </Card>

  <Card title="Headless" icon="robot" href="/guides/authentication/headless">
    Authenticate programmatically without user interaction. Also works on sources that do not require credentials.
  </Card>
</CardGroup>

## How Deck authenticates users

<Steps>
  <Step title="User provides credentials">
    Your user enters their credentials to authenticate with their data source.
  </Step>

  <Step title="Credentials sent to Deck">
    Credentials are securely transmitted to Deck for authentication.
  </Step>

  <Step title="Deck authenticates with data source">
    Deck establishes a connection with the data source on behalf of your user, handling MFA if required.
  </Step>

  <Step title="Access token delivered via webhook">
    Once authentication succeeds, Deck sends an `access_token` to your webhook endpoint.
  </Step>

  <Step title="Run jobs with access token">
    Use the `access_token` to run jobs and access data on behalf of your user.
  </Step>
</Steps>
