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

# Authentication Methods

> List of authentication methods available to TurboStack and instructions to add new ones.

TurboStack supports two different authenticaiton methods:

* **Magic Link** - Perform login through a passwordless email confirmation. (Default)
* **OAuth** - Perform a login through a list of OAuth providers.

To get things started, add this to your `.env.local`: (skip if you already did it)

```bash theme={null}
NEXTAUTH_URL=http://app.localhost:3000
NEXTAUTH_SECRET={{random_uuid}}
```

<Tabs>
  <Tab title="Magic Link">
    This is the easiest method and enabled by default:

    * Setup an [e-mail integration](/features/emails).
    * You're ready to go!
  </Tab>

  <Tab title="OAuth (Google)">
    [NextAuth](https://next-auth.js.org/providers) have a list of providers available to setup, in this tutorial, we will instruct you through Google's integration.

    1. Go to the [Google Developer Console](https://console.cloud.google.com/).
    2. Create or select an existing project.
    3. On the sidebar, navigate to **APIs & Services** → **Credentials**.
    4. Click on **Create Credentials** and select **OAuth 2.0 Client IDs**.
    5. Choose **Web application** as the application type.
    6. Set up your **Authorized redirect URIs**. In development, this will be: `http://app.localhost:3000`. In production, if your host are `myapp.com`, this will be `https://app.myapp.com`
    7. Save the credentials, and you'll get a **Client ID** and **Client Secret**, add them in your `.env.local` file.

    ```bash theme={null}
    GOOGLE_CLIENT_ID={{YOUR_GOOGLE_CLIENT_ID}}
    GOOGLE_CLIENT_SECRET={{YOUR_GOOGLE_CLIENT_SECRET}}
    ```

    You're ready to go.
  </Tab>
</Tabs>
