<p>
    Appwrite Authentication delivers more than just user sign up and log in.
    Authentication makes it easy to build secure and robust authentication with support for many different authentication methods.
</p>

<p>
    You can manage user accounts with user preferences, user labeling, or organizing users into teams.
    Combined with a robust permissions system, Appwrite Authentication provides everything you need to authenticate and manage users.
</p>

<h2><a href="#starter" id="starter">Getting Started</a></h2>
<p>
    Adding Appwrite Authentication to your apps can be as easy as these lines of code.
</p>

<ul class="phases clear" data-ui-phases>
    <li>
        <h3>Web</h3>
        <div class="ide" data-lang="javascript" data-lang-label="Web SDK">
            <pre class="line-numbers"><code class="prism language-javascript" data-prism>import { Client, Account, ID } from "appwrite";

const client = new Client()
    .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('[PROJECT_ID]');               // Your project ID

const account = new Account(client);

const user = await account.create(
    ID.unique(),
    'email@example.com',
    'password'
);</code></pre>
        </div>
    </li>
    <li>
        <h3>Flutter</h3>
        <div class="ide" data-lang="dart" data-lang-label="Flutter SDK">
            <pre class="line-numbers"><code class="prism language-dart" data-prism>import 'package:appwrite/appwrite.dart';

final client = Client()
    .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
    .setProject('[PROJECT_ID]');               // Your project ID

final account = Account(client);

final user = await account.create(
    userId: ID.unique(),
    email: 'email@example.com',
    password: 'password',
);</code></pre>
    </li>
    <li>
        <h3>Android</h3>
        <div class="ide" data-lang="kotlin" data-lang-label="Android SDK">
            <pre class="line-numbers"><code class="prism language-kotlin" data-prism>import io.appwrite.Client
import io.appwrite.services.Account
import io.appwrite.ID

val client = Client()
    .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
    .setProject("[PROJECT_ID]")                // Your project ID

val account = Account(client)

val user = account.create(
    userId = ID.unique(),
    email = "email@example.com",
    password = "password"
)</code></pre>
        </div>
    </li>
    <li>
        <h3>Apple</h3>
        <div class="ide" data-lang="swift" data-lang-label="Apple SDK">
            <pre class="line-numbers"><code class="prism language-swift" data-prism>import Appwrite

let client = Client()
    .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
    .setProject("[PROJECT_ID]")                // Your project ID

let account = Account(client)

let user = try await account.create(
    userId: ID.unique(),
    email: "email@example.com",
    password: "password"
)</code></pre>
        </div>
    </li>
    <li>
        <h3>GraphQL</h3>
        <div class="ide" data-lang="graphql" data-lang-label="GraphQL">
            <pre class="line-numbers"><code class="prism language-graphql" data-prism>
mutation {
    accountCreate(userId: "unique()", email: "email@example.com", password: "password") {
        _id
        email
        name
    }
}</code></pre>
        </div>
    </li>
</ul>

<p>
    Use email and password authentication as a starting point and explore the many powerful features of Appwrite authentication.
</p>

<h2><a href="#account-vs-user-api" id="account-vs-user-api">Account vs Users API</a></h2>

<p>
    Appwrite has two auth APIs for different purposes, which are Account and Users.
    Here's how you choose between the two, depending on your needs.
</p>

<h3>Account API</h3>
<p>
    Use the Account API when acting on behalf of <b>individual users</b> when building client applications, like websites or mobile apps.
    The Account API is authenticated through secure cookies that store session information, so Appwrite knows which authenticated user is accessing data.
    The Account API is safe to expose to end users, because their access to data and resources is <b>limited by Appwrite's permission system</b>.
</p>

<h3>Users API</h3>
<p>
    Use the Users API when <b>acting as an administrator</b> in use cases like building admin consoles or server integrations.
    The Users API uses API keys to authenticate, which means Appwrite only knows which API key is accessing data.
    API keys <b>don't respect permissions</b>, which means they can access all data, and should never be shared with end users in client applications.
    The Users API also has batch operations, letting you query and manage users from an admin's perspective.
</p>

<h2><a href="#explore" id="explore">Explore</a></h2>
<p>Explore Appwrite Authentication's features.</p>

<p>
<a href="/docs/authentication-email-pass"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> 
    Log in with email and password
</a>
</p>

<p>
<a href="/docs/authentication-sms"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> 
    Log in with SMS messages
</a>
</p>

<p>
<a href="/docs/authentication-magic"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> 
    Log in with Magic URL
</a>
</p>

<p>
<a href="/docs/authentication-oauth"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> 
    Log in with OAuth 2
</a>
</p>

<p>
<a href="/docs/authentication-anonymous"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> 
    Log in as a guest (anonymous)
</a>
</p>

<p>
<a href="/docs/authentication-management"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> 
    Manage users
</a>
</p>

<p>
<a href="/docs/authentication-server"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> 
    Server integrations
</a>
</p>

<p>
<a href="/docs/authentication-security"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> 
    Security
</a>
</p>