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

# Configuration

> Learn how to configure third-party services like Stripe, NextAuth, and transactional emails by setting up your environment variables.

Now that you have LaunchKit AWS running locally, let's bring its core features to life by connecting it to third-party services.

All configuration is managed in the `.env` file in your project's root. This file is ignored by Git, ensuring your secret keys are never committed to your repository.

***

### Configuring Authentication (NextAuth)

LaunchKit uses NextAuth.js to handle authentication. While email/password sign-up works out of the box, you can easily enable social logins for providers like Google and GitHub.

#### Google Login

1. Go to the [Google Cloud Console](https://console.cloud.google.com/apis/credentials).
2. Create a new project or select an existing one.
3. Create an **OAuth 2.0 Client ID**.
4. Set the application type to **Web application**.
5. Add an "Authorized redirect URI": `http://localhost:4002/api/auth/callback/google`
6. Copy the **Client ID** and **Client Secret**.
7. Add them to your `.env` file:

```bash theme={null}
# .env
GOOGLE_CLIENT_ID="YOUR_GOOGLE_CLIENT_ID"
GOOGLE_CLIENT_SECRET="YOUR_GOOGLE_CLIENT_SECRET"
```

#### GitHub Login

1. Go to your [GitHub Developer Settings](https://github.com/settings/developers).
2. Click **New OAuth App**.
3. Set the "Authorization callback URL" to `http://localhost:4002/api/auth/callback/github`.
4. Copy the **Client ID** and generate a **New Client Secret**.
5. Add them to your `.env` file:

```bash theme={null}
# .env
GITHUB_CLIENT_ID="YOUR_GITHUB_CLIENT_ID"
GITHUB_CLIENT_SECRET="YOUR_GITHUB_CLIENT_SECRET"
```

***

### Configuring Payments (Stripe)

To process payments and manage subscriptions, you'll need to connect your Stripe account.

1. Go to your [Stripe Dashboard](https://dashboard.stripe.com/test/apikeys).
2. Copy your **Publishable key** and **Secret key**.
3. For local testing of webhooks, install the [Stripe CLI](https://stripe.com/docs/stripe-cli) and run `stripe listen --forward-to localhost:4002/api/webhooks/stripe`. This will give you a webhook signing secret.
4. Add these keys to your `.env` file:

```bash theme={null}
# .env
STRIPE_SECRET_KEY="sk_test_..."
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
```

***

### Configuring Transactional Emails

For sending welcome emails, password resets, and other notifications, you'll need an email provider. LaunchKit is pre-configured for Resend, but can be adapted to others.

1. Go to your [Resend Dashboard](https://resend.com/api-keys).
2. Create a new API Key.
3. Add the key to your `.env` file:

```bash theme={null}
# .env
RESEND_API_KEY="re_..."
```

***

### Next Steps

Your application is now fully configured for local development. The next step is to learn how to deploy it to a live, production environment on AWS.

<Card title="Next: Deployment" icon="cloud-arrow-up" href="/getting-started/deployment">
  Learn how to deploy your fully configured application to AWS using the CDK.
</Card>
